I have a drawer and ive tried to double it. Well it went pretty well, but i had an issue with part of it. If I open the first drawer and click on an item it opens a new drawer and you can choose again. So far so good. the problem is I was tring to add a feature that if you are on the second drawer and you close it, it will instantly open the first drawer.
public void onDrawerClosed(View drawerView) {
super.onDrawerClosed(drawerView);
invalidateOptionsMenu();
if(layer == 1){
layer = 0;
positions = new int[]{-1, -1};
drawerListview.setAdapter(adapter);
***drawerLayout.openDrawer(drawerLayout);***
}else if(layer == 2){
layer = 0;
positions = new int[]{-1, -1};
drawerListview.setAdapter(adapter);
}
}
I marked down where i tried to open the first drawer again.
It didnt throw any error but it just didn
t worked.