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

Asked

Viewed 104 times

0

inserir a descrição da imagem aqui

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 when opening the app the Side menu is displayed without the user action!

Is there any way?

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();
  • 1

    worked legal, thanks.. 100%. I’ll read his documentation, I didn’t remember it, thank you very much.

  • If the answer helped you, you can accept it. If you have any questions, please see help center

  • 1

    Bro did not mark as correct his answer, but I will give + 1 not to pass beaten. =)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.