ConversationFragment的布局:
首先我们找到我们要写的Fragment布局文件。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_p...
分类:
移动开发 时间:
2016-04-26 21:14:23
阅读次数:
187
样式效果
1、创建底部的布局 layout_footer.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
...
分类:
移动开发 时间:
2016-04-26 20:02:15
阅读次数:
217
一直一来对android:layout_height、android:layout_width、android:height、android:width这几个属性的关系有些不理解,既然有了android:layout_height和android:layout_width为什么还要有android: ...
分类:
移动开发 时间:
2016-04-24 18:43:06
阅读次数:
191
LinearLayout 1.核心属性 高度:layout_height (基于内容 wrap_content;基于父控件;) 宽度:layout_width 方向:orientation (纵向 vertical;横向 horizontal;) 位置:layout_gravity (居中 cent ...
分类:
移动开发 时间:
2016-04-18 17:00:18
阅读次数:
247
item.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_p ...
分类:
其他好文 时间:
2016-04-18 11:55:54
阅读次数:
165
checkbox点击切换背景 <CheckBox android:id="@+id/checkbox" android:layout_width="40dp" android:layout_height="40dp" android:button="@null" android:focusable= ...
分类:
其他好文 时间:
2016-04-17 19:15:53
阅读次数:
129
CheckBox两种状态:选中(true)和未选中(false)属性:android:id="@+id/checkbox"android:checked="false"是否选中的状态android:text="女"新建:<CheckBox
android:id="@+id/cb1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:te..
分类:
移动开发 时间:
2016-04-17 01:02:32
阅读次数:
177
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
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