我有3次主要活动垂直对齐3次:toolbar
,MainContainer
& bottombar
如何与不同高度
- 的
toolbar
有60dp - 的
MainContainer
是一个高度配对父亲 - 该
bottombar
是50dp
与此问题,bottombar
不显示在所有,一旦MainContainer
设置为match-parent
它填补布局的休息和推bottombar
出可见的区!同样的事情,如果高度设置为wrap-content
!所以如何解决这个问题..!?
<RelativeLayout
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">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="70dp"
android:background="@color/accent"/>
<FrameLayout
android:id="@+id/MainContainer"
android:layout_below="@id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"/>
<com.roughike.bottombar.BottomBar
android:id="@+id/bottombar"
android:background="@color/black"
android:layout_below="@id/MainContainer"
android:layout_width="match_parent"
android:layout_height="50dp"/>
</RelativeLayout>
仍然没有显示.. –
@SamZar的FrameLayout部分添加'机器人:layout_marginBottom = “50dp”' –
它的工作原理,谢谢:d,但是你应该加入这一行太'Android设备上编辑答案:layout_marginBottom =” 50dp“' –