2017-02-08 135 views
1

我想使用com.roughike.bottombar.BottomBar,但即使在底部设置引力后,它仍会隐藏在动作条的后面。请解决我的错误。 谢谢。底部条不在底部对齐

activity_main.xml中

<android.support.design.widget.CoordinatorLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

     <FrameLayout 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:id="@+id/frame" 
      android:layout_above="@+id/bottomBar" 
      /> 

    <com.roughike.bottombar.BottomBar 
     android:id="@+id/bottomBar" 
     android:layout_width="match_parent" 
     android:layout_height="56dp" 
     android:gravity="bottom" 
     app:bb_tabXmlResource="@xml/bottombar_tabs_color_changing" 
     app:bb_behavior="shifting|shy|underNavbar" /> 
</android.support.design.widget.CoordinatorLayout> 

回答

0

使用android:layout_gravity="bottom"很有效!

+0

嘿谢谢!我是android studio的新手。这是一个愚蠢的错误:D 谢谢! –

+0

@Sharzil Shaikh你可以接受答案,如果它解决了你的问题!^_^ –

+1

嘿对不起,我没有注意到..完成! :d –