I use a MaterialDrawer from Mike Penz and i faced with problem.
I have Activity (AppCompat) and 3 Fragmnts. Activity contain all fragments.
In fragment 2 and 3 i enable Back button in OnCreate
((AppCompatActivity)getActivity()).getSupportActionBar().setDisplayHomeAsUpEnabled(true);
and in Activity
@Override
public void onBackPressed() {
if (drawer.isDrawerOpen())
drawer.closeDrawer();
if (getFragmentManager().getBackStackEntryCount() == 1) {
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
drawer.getActionBarDrawerToggle().syncState();
getFragmentManager().popBackStack();
} else if (getFragmentManager().getBackStackEntryCount() > 0)
getFragmentManager().popBackStack();
else
super.onBackPressed();
}
When active fragment 2 and 3 click on the Back Button leads to opening Drawer &
How can I disable the call Drawer in the 2 and 3 fragment by pressing the button Back?
When I used a standard Drawer I had a theme with ActionBar, there are no such problems.
UPD i need click in Toggle Back Button in Toolbar, no smartphone physical button