我想要这种应该在 ScrollView 上方的底页。
滚动视图中的图像应位于底部工作表的后面。底部工作表应始终在屏幕上,直到单击其上的继续按钮。任何帮助将不胜感激。谢谢 !!
如果底部工作表/面板始终存在,则无需重叠这些面板检查这个简化的 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>
让我们看看代码
<?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>