答案 0 :(得分:0)
如果底部工作表/面板始终存在,则无需重叠这些面板,请检查此简化的xml布局示例:
<?xml version="1.0" encoding="utf-8"?>
<!-- This is your root layout element -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:android_width="match_parent"
android:android_height="0dp"
android:layout_weight="4">
<ScrollView
android:android_width="match_parent"
android:android_height="0dp">
<!-- Put your inner grid layout here -->
</ScrollView>
<!-- this is your bottom panel layout -->
<!-- you can control the size of your bottom -->
<!-- pane by playing with the layout weights -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<Button
android:text="Proceed"
android:background="@drawable/yourSelectorXml"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
答案 1 :(得分:-1)
让我们看看代码
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:android_width="match_parent"
android:android_height="0dp"
android:layout_weight="4">
<ScrollView
android:android_width="match_parent"
android:android_height="0dp">
<!-- Put your inner grid layout here -->
</ScrollView>
<!-- put your bottom panel layout here -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<Button
android:text="Proceed"
android:background="@drawable/yourSelectorXml"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>