笔记:读Android文档的一些细节1
来源:互联网 发布:p图卖萌软件 编辑:程序博客网 时间:2024/06/06 06:41
The default weight for all views is 0, so if you specify any weight value greater than 0 to only one view, then that view fills whatever space remains after all views are given the space they require. So, to fill the remaining space in your layout with the EditText
element, give it a weight of 1 and leave the button with no weight.
<EditText android:layout_weight="1" ... />
In order to improve the layout efficiency when you specify the weight, you should change the width of theEditText
to be zero (0dp). Setting the width to zero improves layout performance because using "wrap_content"
as the width requires the system to calculate a width that is ultimately irrelevant because the weight value requires another width calculation to fill the remaining space.
<EditText android:layout_weight="1" android:layout_width="0dp" ... />
Figure 3 shows the result when you assign all weight to the EditText
element.
- 笔记:读Android文档的一些细节1
- 继承的一些细节,笔记
- Android开发的一些细节
- Android的一些细节概念
- Android 权限的一些细节
- Android 权限的一些细节
- python 细节上的一些笔记
- PS的一些小细节(笔记)
- Android编程一些需要关注的细节
- Android SQLite的一些操作细节
- android studio一些严格的细节
- 【Android】【ViewGroup】【ScrollView】ScrollView的一些细节
- 【Android】【ViewGroup】【ListView】ListView的一些细节
- Android Fragment的一些使用细节
- Android 进阶4:Service 的一些细节
- Android 进阶4:Service 的一些细节
- 菜鸟学Android笔记(二十二):Servlet的一些细节
- 【android学习笔记】播放器中一些细节处理
- ArrayList和Vector的区别,HashMap和Hashtable的区别以及线程安全的理解
- n*1
- UIImageVIew ContentMode 属性
- 反射
- 03-树2 List Leaves
- 笔记:读Android文档的一些细节1
- Java多线程学习(吐血超详细总结)
- vb
- 《C# in Depth:深入理解C#》读书笔记 - 事件
- android客户端性能测试
- 双向链表
- 收集的编辑器名称
- StarUML 2 设置背景色
- Byte类型问题