@Override
public boolean onNavigationItemSelected(int itemPosition, long itemId) {
if(mainact == 0)
mainact = 1;
if (itemPosition == 0 && mainact == 1) {
mainact = 0;
Toast.makeText(getBaseContext(),
itemId + "main page = " + itemPosition, Toast.LENGTH_SHORT)
.show();
Intent mainpage = new Intent(MainActivity.this, MainPage.class);
startActivity(mainpage);
}
return false;
}