Android 底部菜单移动到底部

Android 底部菜单移动到底部,android,Android,如何解决android底部菜单中的问题 主活动的xml代码 <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com

如何解决android底部菜单中的问题

主活动的xml代码

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".Main2Activity">


    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">


        <FrameLayout
            android:id="@+id/framtab"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@+id/bottomMenu2">

        </FrameLayout>


        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:id="@+id/bottomMenu2"
            android:layout_alignParentBottom="true"
            android:layoutDirection="rtl"
            android:background="@drawable/white_grey_border_top">

            <include layout="@layout/bottom_menu"/>



        </RelativeLayout>

    </RelativeLayout>

</FrameLayout>


底部菜单安卓移动到底部

尝试将相对位置的布局高度从50dp设置为包裹内容。 此外,底部菜单布局可能是问题所在

试试这个:

<LinearLayout
        android:layout_width="match_parent"
        android:orientation="vertical"
        android:layout_height="match_parent">


        <FrameLayout
            android:id="@+id/framtab"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:layout_above="@+id/bottomMenu2">

        </FrameLayout>


        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/bottomMenu2"
            android:layout_alignParentBottom="true"
            android:layoutDirection="rtl"
            android:background="@drawable/white_grey_border_top">

            <include layout="@layout/bottom_menu"/>



        </LinearLayout>


2009/