zjywill zjywill - 1 year ago 392
Android Question

Android new Bottom Navigation bar

Saw the new guideline came out, and used in Google photos latest app.
Have no idea how to use the new Bottom Navigation Bar.
See through the new support lib, didn't find any lead.

enter image description here

Can not find any official sample.

How to use the new Bottom bar? Don't want to do any customize.

Answer Source

I think you might looking for this.

Here's a quick snippet to get started:

public class MainActivity extends AppCompatActivity {
    private BottomBar mBottomBar;

    protected void onCreate(Bundle savedInstanceState) {

        // Notice how you don't use the setContentView method here! Just
        // pass your layout to bottom bar, it will be taken care of.
        // Everything will be just like you're used to.
        mBottomBar = BottomBar.bind(this, R.layout.activity_main,

                new BottomBarTab(R.drawable.ic_recents, "Recents"),
                new BottomBarTab(R.drawable.ic_favorites, "Favorites"),
                new BottomBarTab(R.drawable.ic_nearby, "Nearby"),
                new BottomBarTab(R.drawable.ic_friends, "Friends")

        mBottomBar.setOnItemSelectedListener(new OnTabSelectedListener() {
            public void onItemSelected(final int position) {
                // the user selected a new tab

    protected void onSaveInstanceState(Bundle outState) {

Here is reference link.


Surely it will help you.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download