laobie / StatusBarUtil

A util for setting status bar style on Android App.
http://t.cn/Rq746Kb
Apache License 2.0
8.82k stars 1.72k forks source link

BottomNavigationView中字体展示不全现象。 #142

Closed XiongKe94 closed 6 years ago

XiongKe94 commented 7 years ago
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout 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:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="@bool/out_fits_system_windows"
    tools:context=".ui.activity.MainActivity"
    tools:openDrawer="start">

    <android.support.design.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/bg_colorful"
      >

        <FrameLayout
            android:id="@+id/frame_control"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:layout_behavior="@string/appbar_scrolling_view_behavior" />

        <android.support.design.widget.BottomNavigationView
            android:id="@+id/bottom_navigation_view"
            android:layout_width="match_parent"
            android:layout_height="@dimen/size_56"
            android:layout_gravity="bottom"
            android:background="@drawable/bottom_bg"
            app:itemIconTint="@color/selector_navigation_tab_color"
            app:itemTextColor="@color/selector_navigation_tab_color"
            app:layout_behavior="@string/bottom_navigation_behavior"
            app:menu="@menu/navigation_tabs" />
    </android.support.design.widget.CoordinatorLayout>

    <android.support.design.widget.NavigationView
        android:id="@+id/nav_view"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:fitsSystemWindows="true"
        app:headerLayout="@layout/nav_header_main"
        app:menu="@menu/drawer_menu" />

</android.support.v4.widget.DrawerLayout>

StatusBarUtil.setTranslucentForDrawerLayout(MainActivity.this, drawerLayout); 布局中含有BottomNavigationView时,就会出现BottomNavigationView中字体展示不全现象。

laobie commented 7 years ago

这个应该和你的布局有关系,你可以看看 demo 中的示例,然后检查下你的布局