我正在开发一个android应用程序。
我有一个问题,我的LinearLayout窗口小部件在屏幕上不可见。
这是我的布局
<LinearLayout
android:id="@+id/linear_layout_row_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_marginStart="5dp"
android:layout_marginLeft="5dp"
android:layout_marginEnd="5dp"
android:layout_marginRight="5dp"
android:orientation="vertical"
android:weightSum="2">
<LinearLayout
android:id="@+id/linear_layout_row1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="60dp"
android:layout_marginEnd="60dp"
android:layout_weight="1"
android:orientation="horizontal"
android:weightSum="2">
// Other widgets
</LinearLayout>
<LinearLayout
android:id="@+id/linear_layout_row2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="60dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="60dp"
android:layout_marginBottom="40dp"
android:layout_weight="1"
android:orientation="horizontal"
android:weightSum="1">
// Other widgets
</LinearLayout>
<LinearLayout
android:id="@+id/linear_layout_row3"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginStart="60dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="60dp"
android:layout_marginBottom="40dp"
android:layout_weight="1"
android:orientation="horizontal"
android:weightSum="2">
// Other widgets
</LinearLayout>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
在这种情况下linear_layout_row3,屏幕上不可见。
如果我将其向上移动,则会显示出来,但是下面移动的布局将不可见。
我不明白这个问题,您能帮忙找到它吗?