Skip to content

BlurBottomNavigationView

XML レイアウトでの使用

xml
<com.qmdeve.blurview.widget.BlurBottomNavigationView
    android:id="@+id/bottomNavigation"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    app:blurRadius="12dp"
    app:overlayColor="#80FFFFFF"
    app:menu="@menu/bottom_nav_menu"
    app:itemIconTint="@color/bottom_nav_icon_tint"
    app:itemTextColor="@color/bottom_nav_text_color"
    app:itemBackground="@drawable/bottom_nav_item_background"
    app:elevation="8dp"
    app:labelVisibilityMode="labeled"/>

API リファレンス

メソッド説明
setMenuメニューを設定
setOnNavigationItemSelectedListenerナビゲーションアイテム選択リスナーを設定
setOnNavigationItemReselectedListenerナビゲーションアイテム再選択リスナーを設定
getMenu現在のメニューを取得
setSelectedItemId選択されたアイテムを設定
setItemIconTintListアイコンの色調リストを設定
setItemTextColorアイテムのテキスト色を設定

属性説明

属性名説明
app:menureferenceボトムナビゲーションメニューリソースを設定
app:itemIconTintcolorアイコンの色調リストを設定
app:itemTextColorcolorアイテムのテキスト色を設定
app:itemBackgrounddrawableアイテムの背景を設定
app:elevationdimensionエレベーションを設定
app:labelVisibilityModeenumラベルの表示モードを設定 (labeled, selected, unlabeled, auto)