使用LinearLayout和alignParentBottom ="true"
像这样的东西:
<RelativeLayout
android:id="@+id/mainLyt"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<!-- Some layout things -->
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@+id/bottomBar">
<!-- some scrolling content -->
</ScrollView>
<LinearLayout
android:id="@+id/bottomBar"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:orientation="horizontal"
android:layout_alignParentBottom="true">
<!-- Some Buttons -->
</LinearLayout>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
我没有尝试编译,你可能需要修复一些错别字,但这是一个基本的想法,你可以用它来实现你想要做的事情.
| 归档时间: |
|
| 查看次数: |
9220 次 |
| 最近记录: |