mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Init navigation menu
This commit is contained in:
parent
4d55741f23
commit
7a997b5259
1 changed files with 9 additions and 2 deletions
|
@ -170,6 +170,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
final ViewGroup childDrawer = (ViewGroup) drawerLayout.getChildAt(1);
|
final ViewGroup childDrawer = (ViewGroup) drawerLayout.getChildAt(1);
|
||||||
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.app_name, R.string.app_name) {
|
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.app_name, R.string.app_name) {
|
||||||
public void onDrawerClosed(View view) {
|
public void onDrawerClosed(View view) {
|
||||||
|
Log.i("Drawer closed");
|
||||||
owner.stop();
|
owner.stop();
|
||||||
|
|
||||||
drawerLayout.setDrawerLockMode(LOCK_MODE_UNLOCKED);
|
drawerLayout.setDrawerLockMode(LOCK_MODE_UNLOCKED);
|
||||||
|
@ -181,6 +182,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
public void onDrawerOpened(View drawerView) {
|
public void onDrawerOpened(View drawerView) {
|
||||||
super.onDrawerOpened(drawerView);
|
super.onDrawerOpened(drawerView);
|
||||||
|
|
||||||
|
Log.i("Drawer opened");
|
||||||
owner.start();
|
owner.start();
|
||||||
|
|
||||||
if (normal && landscape && landscape3 &&
|
if (normal && landscape && landscape3 &&
|
||||||
|
@ -194,6 +196,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
public void onDrawerSlide(View drawerView, float slideOffset) {
|
public void onDrawerSlide(View drawerView, float slideOffset) {
|
||||||
super.onDrawerSlide(drawerView, slideOffset);
|
super.onDrawerSlide(drawerView, slideOffset);
|
||||||
|
|
||||||
|
Log.i("Drawer offset=" + slideOffset);
|
||||||
if (slideOffset > 0)
|
if (slideOffset > 0)
|
||||||
owner.start();
|
owner.start();
|
||||||
else
|
else
|
||||||
|
@ -374,8 +377,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
@Override
|
@Override
|
||||||
protected void onPostCreate(Bundle savedInstanceState) {
|
protected void onPostCreate(Bundle savedInstanceState) {
|
||||||
super.onPostCreate(savedInstanceState);
|
super.onPostCreate(savedInstanceState);
|
||||||
drawerLayout.setup(getResources().getConfiguration(), drawerContainer, drawerToggle);
|
|
||||||
drawerToggle.syncState();
|
|
||||||
|
|
||||||
// Fixed menus
|
// Fixed menus
|
||||||
|
|
||||||
|
@ -586,6 +587,12 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||||
adapterNavMenu.notifyDataSetChanged();
|
adapterNavMenu.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Log.i("Drawer start");
|
||||||
|
owner.start();
|
||||||
|
|
||||||
|
drawerLayout.setup(getResources().getConfiguration(), drawerContainer, drawerToggle);
|
||||||
|
drawerToggle.syncState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue