JetradarMobile / android-multibackstack

Persistent bottom navigation like in instagram
Apache License 2.0
216 stars 28 forks source link

Change background color #2

Closed Hary25 closed 8 years ago

Hary25 commented 8 years ago

can i change background color from white to blue?

johnkil commented 8 years ago

@Hary25 you mean window background color?

Hary25 commented 8 years ago

background color of bottom navigation @johnkil

johnkil commented 8 years ago

I used a third-party library https://github.com/Ashok-Varma/BottomNavigation. Info about customization of bottom navigation you can find here https://github.com/Ashok-Varma/BottomNavigation/wiki/Customisations.

For example, how to make blue bottom navigation on sample project:

activity_main.xml

<LinearLayout
    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:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

  <FrameLayout
      android:id="@+id/content"
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:layout_weight="1"/>

  <com.ashokvarma.bottomnavigation.BottomNavigationBar
      android:id="@+id/bottom_navigation"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_gravity="bottom"
      app:bnbBackgroundColor="#0000FF"/> <!-- blue color -->

</LinearLayout>