app/src/main/java/com/mensa/zhmensa/activities/MainActivity.java
/**
     * Loads and initializes all components used for the sidebar navigation and the actionbar.
     */
Loads and initializes all components used for the sidebar navigation and the actionbar.
Loads and initializes all components used for the sidebar navigation and the actionbar .
private void initializeSidebarDrawer() {
        expandableListView = findViewById(R.id.expandableListView);
        DrawerLayout drawer = findViewById(R.id.drawer_layout);
        NavigationView navigationView = findViewById(R.id.nav_view);
        View myLayout = navigationView.getHeaderView(0);
        if (myLayout != null)
            currentDayTextView = myLayout.findViewById(R.id.current_day_navgiation);
        if (currentDayTextView != null)
            currentDayTextView.setText(String.format(getString(R.string.week_of), Helper.getHumanReadableDay(0)));
        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
                this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
        drawer.addDrawerListener(toggle);
        toggle.syncState();
        navigationView.setNavigationItemSelectedListener(this);
    }
private void initializeSidebarDrawer ( ) { expandableListView = findViewById ( R . id . expandableListView ) ; DrawerLayout drawer = findViewById ( R . id . drawer_layout ) ; NavigationView navigationView = findViewById ( R . id . nav_view ) ; View myLayout = navigationView . getHeaderView ( 0 ) ; if ( myLayout != null ) currentDayTextView = myLayout . findViewById ( R . id . current_day_navgiation ) ; if ( currentDayTextView != null ) currentDayTextView . setText ( String . format ( getString ( R . string . week_of ) , Helper . getHumanReadableDay ( 0 ) ) ) ; ActionBarDrawerToggle toggle = new ActionBarDrawerToggle ( this , drawer , toolbar , R . string . navigation_drawer_open , R . string . navigation_drawer_close ) ; drawer . addDrawerListener ( toggle ) ; toggle . syncState ( ) ; navigationView . setNavigationItemSelectedListener ( this ) ; }
Loads and initializes all components used for the sidebar navigation and the actionbar.
Loads and initializes all components used for the sidebar navigation and the actionbar .
// Set up sidebar navigation //View myView = myLayout.findViewById( R.id.someinnerview ); // id of a view