New NavigationDrawer on fixed left tablets

I could not find a way to easily make a tablet with multiple panels using NavigationDrawer. The Play Music app does this.

I used LOCK_MODE_LOCKED_OPENED , but it opens a box on top of the contents, as expected, and it cannot be closed. Therefore, the contents are not fully visible.

Do I need to do this manually?

+4
source share
1 answer

The only way we found is to do it manually, we created a simple linear layout for the tablet and check the view instance in action:

 View layout = findViewById(R.id.navigation_layout); if (layout instanceof DrawerLayout) { drawerLayout = (DrawerLayout) layout; // initialization of drawer toggle etc. ... } else { // linear layout getSupportActionBar().setHomeButtonEnabled(false); } 
+4
source

Source: https://habr.com/ru/post/1483089/


All Articles