【问题标题】:Bottom bar not aligned at bottom底栏未在底部对齐
【发布时间】:2017-06-25 22:20:38
【问题描述】:

我想使用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>

【问题讨论】:

    标签: android xml android-coordinatorlayout


    【解决方案1】:

    使用android:layout_gravity="bottom" 会起作用的!

    【讨论】:

    • 嘿谢谢!!我是安卓工作室的新手。这是一个愚蠢的错误 :D 还是谢谢!!
    • @Sharzil Shaikh 如果它解决了您的问题,您可以接受答案! ^_^
    • 嘿对不起,我没有注意到.. 完成! :D
    猜你喜欢
    • 2020-12-28
    • 1970-01-01
    • 2014-10-06
    • 1970-01-01
    • 2015-12-16
    • 2018-03-18
    • 2012-11-06
    • 1970-01-01
    • 2016-12-03
    相关资源
    最近更新 更多