1、android:layout_height属性: 必须将ListView的布局高度属性设置为非“wrap_content”(可以是“match_parent / fill_parent / 400dp等绝对数值”),如果ListView的布局高度为“wrap_content”,那么getView ...
分类:
其他好文 时间:
2016-04-28 21:21:12
阅读次数:
208
原理 总 布局为RelativeLayout或者FrameLayout,在这里我们用的是RelativeLayout。先设置背景图片,宽度和高度都 fill_parent,在设置viewpager,viewpager的背景要透明哟~这样背景图片就可以显示在页面上。对viewpager进行滑动 监听, ...
分类:
移动开发 时间:
2016-04-21 18:36:49
阅读次数:
234
activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="f ...
分类:
移动开发 时间:
2016-04-13 20:23:35
阅读次数:
256
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" andr ...
分类:
其他好文 时间:
2016-04-10 19:27:53
阅读次数:
147
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" andr ...
分类:
其他好文 时间:
2016-04-10 19:23:20
阅读次数:
131
layout_weight 表示布局的权重,0或者1。比如消息框对应的EditText控件的默认布局权重是0,设定的布局高度(layout height)是fill_parent,而且它在发送按钮之前先一步申请空间,这样发送按钮就被挤出屏幕之外而无法显示了。为了让发送按钮显示出来,我们可以把消息框的 ...
分类:
其他好文 时间:
2016-04-06 15:05:55
阅读次数:
138
写了个小例子xml代码如下: 运行结果如图: 这里有一比较奇怪的地方: 当二级的Linearlayout节点的layout_width,layout_height属性值是fill_parent或match_parent(因为版本间的兼容性问题建议使用),此时layout_weight的权重值与屏幕布 ...
分类:
移动开发 时间:
2016-04-05 00:38:53
阅读次数:
692
1.LinearLayout orention 水平和垂直 weight 切割闲置空间 水平布局 切割宽度 垂直布局 切割的高度 切割的时候 指定的高度或者宽度不能用fill_parent/match_parent 2.Tablayout <TabRow> </TabRow> 一行 <TabRow> ...
分类:
移动开发 时间:
2016-03-28 15:06:31
阅读次数:
168
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" andr ...
分类:
其他好文 时间:
2016-03-26 12:06:59
阅读次数:
193
首先来实现异步下载网络图片,布局文件如下:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientatio...
分类:
移动开发 时间:
2016-03-19 13:07:18
阅读次数:
271