Open the app with navigation open. How can I do this implementation in my code?

0

I have the following code:

  headerNavigationLeft = new AccountHeader()
            .withActivity(this)
            .withCompactStyle(false)
            .withThreeSmallProfileImages(true)
            .withHeaderBackground(R.drawable.navigation)
            .build();  

 navigationDrawerLeft = new Drawer()
            .withActivity(this)
            .withToolbar(mtoolbar)
            .withDisplayBelowToolbar(false)
            .withActionBarDrawerToggleAnimated(true)
            .withDrawerGravity(Gravity.START)
            .withSelectedItem(0)
            .withActionBarDrawerToggle(true)
            .withAccountHeader(headerNavigationLeft)
            .build();

I would like to open the app when the Side menu is displayed without user action!

Is there any way to do it?

    
asked by anonymous 30.10.2016 / 17:11

1 answer

1

From what I've seen, this is the implementation of MaterialDrawer

According to the documentation, follow the example to open the Menu:

final Drawer navigationDrawerLeft = new DrawerBuilder()
                .withActivity(this)
                .withToolbar(mtoolbar)
                .withDisplayBelowToolbar(false)
                .withActionBarDrawerToggleAnimated(true)
                .withDrawerGravity(Gravity.START)
                .withSelectedItem(0)
                .withActionBarDrawerToggle(true)
                .withAccountHeader(headerNavigationLeft)
                .build();

navigationDrawerLeft.openDrawer();
    
01.11.2016 / 20:56