use of run.wallet.iota.ui.fragment.SettingsFragment 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;
}
use of run.wallet.iota.ui.fragment.SettingsFragment in project run-wallet-android by runplay.
the class SettingsActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AppTheme.init(this);
AppTheme.setNavColors(this);
setContentView(R.layout.activity_settings);
getFragmentManager().beginTransaction().add(R.id.content, new SettingsFragment()).commit();
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setBackgroundDrawable(new ColorDrawable(B.getColor(this, AppTheme.getPrimary())));
}
AppTheme.setNavColors(this);
}
Aggregations