56 lines
1.5 KiB
Java
56 lines
1.5 KiB
Java
package de.vanitasvitae.slam.activity;
|
|
|
|
import android.os.Bundle;
|
|
import android.support.design.widget.NavigationView;
|
|
import android.support.v4.widget.DrawerLayout;
|
|
import android.support.v7.app.ActionBarDrawerToggle;
|
|
import android.support.v7.widget.Toolbar;
|
|
import android.view.Menu;
|
|
|
|
import butterknife.BindView;
|
|
import butterknife.ButterKnife;
|
|
import de.vanitasvitae.slam.R;
|
|
|
|
/**
|
|
* Created by vanitas on 22.01.18.
|
|
*/
|
|
public class MainActivity extends ThemedAppCompatActivity {
|
|
|
|
@BindView(R.id.toolbar)
|
|
Toolbar toolbar;
|
|
|
|
@BindView(R.id.navigation_view)
|
|
NavigationView navigationView;
|
|
|
|
@BindView(R.id.drawer_layout)
|
|
DrawerLayout drawerLayout;
|
|
|
|
private ActionBarDrawerToggle drawerToggle;
|
|
|
|
@Override
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
super.onCreate(savedInstanceState);
|
|
setContentView(R.layout.activity_main);
|
|
ButterKnife.bind(this);
|
|
|
|
setSupportActionBar(toolbar);
|
|
|
|
drawerToggle = new ActionBarDrawerToggle(
|
|
this, drawerLayout, toolbar, R.string.error_incorrect_password, R.string.error_invalid_jid);
|
|
drawerLayout.addDrawerListener(drawerToggle);
|
|
}
|
|
|
|
@Override
|
|
public boolean onCreateOptionsMenu(Menu menu) {
|
|
getMenuInflater().inflate(R.menu.menu_main, menu);
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public void onPostCreate(Bundle savedInstanceState) {
|
|
super.onPostCreate(savedInstanceState);
|
|
drawerToggle.syncState();
|
|
}
|
|
|
|
}
|