Fixed toolbar

This commit is contained in:
PeratX 2017-07-02 17:31:58 +08:00
parent c52d311d15
commit 25fa2e2167

View File

@ -74,7 +74,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
//setSupportActionBar(toolbar); //causes toolbar issues
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.main_drawer_layout);
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
@ -92,13 +92,6 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
Log.d(TAG, "onCreate");
}
@Override
public void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
currentFragment.checkStatus();
}
private void switchFragment(ToolbarFragment fragment) {
FragmentManager fm = getFragmentManager();
fm.beginTransaction().replace(R.id.id_content, fragment).commit();