And*_*wJM 29 android android-layout
我有一个相对布局.为简单起见,有一个ImageView,EditText和Button:
ImageView是一个固定高度的横幅EditText哪里android:layout_width="fill_parent"Button具有固定宽度和高度的问题是我想要editText填充屏幕的剩余高度.将图像放在顶部,在底部放置一个按钮,在中间放置并编辑占据剩余空间的文本.
我必须使用什么属性来获得类似的东西?
pet*_*tos 68
为此,有LinearLayout与layout_weight财产.使用LinearLayout了持有这些3个元素.对于Button和ImageView,设置layout_height为wrap_content.对于EditText集合layout_height="0dp"和layout_weight="1".
| 归档时间: |
|
| 查看次数: |
16261 次 |
| 最近记录: |