【发布时间】:2018-03-28 15:35:44
【问题描述】:
如何在 xml 中处理 LinearLayout 半高 fill_parent?
<LinearLayout android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weightSum="1">
<ImageView android:layout_height="fill_parent"
android:layout_width="0dp"
android:layout_weight="0.5"/>
</LinearLayout>
我想对身高做类似的事情。
【问题讨论】:
-
而不是 fill_parent 在 dp 中指定所需的值。像 100dp 或任何你想要的。
-
你想让你的linearLayout是平方的吗?
-
我只想有一半的屏幕和 1 个线性布局和另一半的屏幕
标签: android xml height android-linearlayout