## 1.抽屉控件SlidingDrawer:一定要配置android:handle(把手)和android:content(内容),并在子View中添加把手和内容的布局```java <SlidingDrawer android:layout_width="match_parent" androi ...
分类:
移动开发 时间:
2017-06-12 11:54:09
阅读次数:
236
一、TextView(显示控件) android:id(给当前控件定义唯一的标识符)——示例:android:id = "@+id/text_view" android:layout_width(指定控件的宽度)——示例:andriod:layout_width = "match_parent" a ...
分类:
其他好文 时间:
2017-06-09 22:42:25
阅读次数:
309
定义的getView运行多次的ListView布局: <ListView android:id="@+id/lv_messages" android:layout_width="match_parent" android:layout_height="match_parent" android:la ...
分类:
移动开发 时间:
2017-06-03 12:36:35
阅读次数:
212
1.创建程序activity_main: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_hei ...
分类:
移动开发 时间:
2017-05-29 15:57:10
阅读次数:
243
当ScrollView里的元素想填满ScrollView时,使用"fill_parent"或者"match_parent"是不管用的,必需为ScrollView设置:android:fillViewport="true"。 当ScrollView没有fillVeewport=“true”时, 里面的 ...
分类:
其他好文 时间:
2017-05-23 17:22:52
阅读次数:
157
(转载http://www.cnblogs.com/nikyxxx/archive/2012/06/15/2551390.html) 三个属性都用来适应视图的水平或垂直大小,一个以视图的内容或尺寸为基础的布局比精确地指定视图范围更加方便。 1)fill_parent 设置一个构件的布局为fill_p ...
分类:
移动开发 时间:
2017-05-23 11:21:48
阅读次数:
178
需求:网络请求接口,实现自动依次播放视频 1:xml布局文件 <VideoView android:id="@+id/video" android:layout_width="match_parent" android:layout_height="wrap_content" android:lay ...
分类:
其他好文 时间:
2017-05-18 16:50:55
阅读次数:
197
Android:日常学习笔记(7)———探究UI开发(1) 常用控件的使用方法 TextView 说明:TextView是安卓中最为简单的一个控件,常用来在界面上显示一段文本信息。 代码: 说明: 1.match_parent表示让当前控件的大小与其父布局大小一样,也就是由父布局来决定当前控件的大小 ...
分类:
移动开发 时间:
2017-05-17 19:57:58
阅读次数:
420
布局: <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <RelativeLayout android:lay ...
分类:
其他好文 时间:
2017-05-16 20:46:23
阅读次数:
244
近期在工作中遇到了这样一个问题,使用一个GridView展示数据,item中仅仅是一个TextView,可是里面显示的文字多少不固定多少,必须所有展示出来. 遇到的问题: 1.把item中的宽和高设置match_parent,还是设置成wrap_content,当内容过多的时候,会覆盖下一行的显示的 ...
分类:
其他好文 时间:
2017-05-14 13:48:45
阅读次数:
252