屏幕底部是android中的菜单栏/工具栏

屏幕底部是android中的菜单栏/工具栏,android,android-menu,android-tabs,Android,Android Menu,Android Tabs,有人知道怎么做吗?使用带有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_pa


有人知道怎么做吗?

使用带有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>


我没有尝试编译,您可能需要修复一些拼写错误,但这是一个基本的想法,您可以使用它来实现您正在尝试的操作。

在onCreat之后使用以下几行

    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.home_screen);

谢谢你的回复。如果我放一个滚动视图呢?工具栏未固定在按钮处。由于
布局\u alignParentBottom=“true”
参数,工具栏固定在底部。我将编辑示例代码以包含一个滚动视图,一秒钟