use of run.wallet.iota.ui.fragment.NetworkTabFragment in project run-wallet-android by runplay.
the class MainActivity method onNavigationItemSelected.
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
Fragment fragment = null;
getFragmentManager().popBackStack();
switch(item.getItemId()) {
case R.id.nav_wallet:
showLogoutNavigationItem();
if (Store.getCurrentSeed() != null) {
if (!Store.isLoggedIn()) {
UiManager.checkPin(this);
killFragments = true;
} else {
killFragments = true;
fragment = new WalletTabFragment();
appRate();
}
} else {
killFragments = true;
fragment = new WelcomeFragment();
}
break;
case R.id.nav_choose_wallet:
fragment = new ChooseSeedFragment();
killFragments = true;
break;
case R.id.nav_node_info:
fragment = new NetworkTabFragment();
break;
case R.id.nav_help:
UiManager.openFragmentBackStack(this, HelpFragment.class);
break;
case R.id.nav_tor:
UiManager.openFragmentBackStack(this, TorFragment.class);
break;
/*
case R.id.nav_messaging:
if (Store.isLoggedIn()) {
fragment = new MsgHomeFragment();
killFragments = true;
}
break;
*/
case R.id.nav_settings:
// UiManager.openFragmentBackStack(this,SettingsFragment.class);
// fragment = new SettingsFragment();
Intent settings = new Intent(MainActivity.this, SettingsActivity.class);
startActivityForResult(settings, 0);
break;
}
if (fragment != null) {
showFragment(fragment, false, killFragments);
}
drawer.closeDrawer(GravityCompat.START);
return true;
}
Aggregations