按钮与 ListView 的数据重叠
Button got overlapped by the ListView's Data
我想知道在 Listview 之后创建一个按钮而不为其高度分配任何核心值的可能性。
当行数超过 14 或 15.For 我的布局主要是我使用 LinearLayout 时,我的按钮被 Listview 覆盖,因为我觉得不太舒服。
我在这里附上我的布局的 xml 片段和 image.Please 看看并留下您的评论和摆脱上述情况的方法。
谢谢大家。
布局xml文件(片段)
<HorizontalScrollView
android:id="@+id/scroll_full"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/invScanType" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/lay_fullTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="#000000"
android:orientation="horizontal"
>
<TextView
style="@style/textRegular_list"
android:layout_width="105dp"
android:layout_height="wrap_content"
android:text="@string/itemno"
android:textStyle="bold" >
</TextView>
<TextView
style="@style/textRegular_list"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:text="@string/description"
android:textStyle="bold" >
</TextView>
<TextView
style="@style/textRegular_list"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="@string/pick_seq"
android:textStyle="bold" >
</TextView>
<TextView
style="@style/textRegular_list"
android:layout_width="105dp"
android:layout_height="wrap_content"
android:text="@string/mseordqty"
android:textStyle="bold" >
</TextView>
<TextView
style="@style/textRegular_list"
android:layout_width="105dp"
android:layout_height="wrap_content"
android:text="@string/mseshpqty"
android:textStyle="bold" >
</TextView>
<TextView
style="@style/textRegular_list"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="@string/uom"
android:textStyle="bold" >
</TextView>
<TextView
style="@style/textRegular_list"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:text="@string/mseshipvia"
android:textStyle="bold" >
</TextView>
<TextView
style="@style/textRegular_list"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:text="@string/msecomments"
android:textStyle="bold" >
</TextView>
</LinearLayout>
<ListView
android:id="@+id/lst_msefull"
style="@style/ListViewAppTheme.White"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
</ListView>
</LinearLayout>
</HorizontalScrollView>
<LinearLayout
android:id="@+id/lay_mse"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="16dp"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<Button
android:id="@+id/btn_mseExit"
style="@style/ButtonAppTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/action_exit_in" />
</LinearLayout>
布局图片
这里我想限制我的 Listview 高度,以便当 Listview 内容很大时按钮不会重叠。
将所有内容垂直包裹 LinearLayout
。
将 HorizontalScrollView
的 height
设置为 0dp
,将 weight
设置为 1
。
我想知道在 Listview 之后创建一个按钮而不为其高度分配任何核心值的可能性。
当行数超过 14 或 15.For 我的布局主要是我使用 LinearLayout 时,我的按钮被 Listview 覆盖,因为我觉得不太舒服。
我在这里附上我的布局的 xml 片段和 image.Please 看看并留下您的评论和摆脱上述情况的方法。
谢谢大家。
布局xml文件(片段)
<HorizontalScrollView
android:id="@+id/scroll_full"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/invScanType" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:id="@+id/lay_fullTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="#000000"
android:orientation="horizontal"
>
<TextView
style="@style/textRegular_list"
android:layout_width="105dp"
android:layout_height="wrap_content"
android:text="@string/itemno"
android:textStyle="bold" >
</TextView>
<TextView
style="@style/textRegular_list"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:text="@string/description"
android:textStyle="bold" >
</TextView>
<TextView
style="@style/textRegular_list"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="@string/pick_seq"
android:textStyle="bold" >
</TextView>
<TextView
style="@style/textRegular_list"
android:layout_width="105dp"
android:layout_height="wrap_content"
android:text="@string/mseordqty"
android:textStyle="bold" >
</TextView>
<TextView
style="@style/textRegular_list"
android:layout_width="105dp"
android:layout_height="wrap_content"
android:text="@string/mseshpqty"
android:textStyle="bold" >
</TextView>
<TextView
style="@style/textRegular_list"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="@string/uom"
android:textStyle="bold" >
</TextView>
<TextView
style="@style/textRegular_list"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:text="@string/mseshipvia"
android:textStyle="bold" >
</TextView>
<TextView
style="@style/textRegular_list"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:text="@string/msecomments"
android:textStyle="bold" >
</TextView>
</LinearLayout>
<ListView
android:id="@+id/lst_msefull"
style="@style/ListViewAppTheme.White"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
</ListView>
</LinearLayout>
</HorizontalScrollView>
<LinearLayout
android:id="@+id/lay_mse"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="16dp"
android:gravity="center_horizontal"
android:orientation="horizontal" >
<Button
android:id="@+id/btn_mseExit"
style="@style/ButtonAppTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/action_exit_in" />
</LinearLayout>
布局图片
这里我想限制我的 Listview 高度,以便当 Listview 内容很大时按钮不会重叠。
将所有内容垂直包裹 LinearLayout
。
将 HorizontalScrollView
的 height
设置为 0dp
,将 weight
设置为 1
。