Exemple #1
0
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   if (currentFragment != null) {
     currentFragment.onActivityResult(requestCode, resultCode, data);
   }
   super.onActivityResult(requestCode, resultCode, data);
 }
Exemple #2
0
  @Override
  public void onCreate(Bundle icicle) {
    mBase = K9ActivityCommon.newInstance(this);
    super.onCreate(icicle);

    setContentView(R.layout.settings);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);

    if (toolbar != null) {
      toolbar.setTitle(R.string.preferences_title);
      setSupportActionBar(toolbar);
    }

    ActionBar actionBar = getSupportActionBar();

    if (actionBar != null) {
      actionBar.setDisplayHomeAsUpEnabled(true);
    }

    final Intent intent = getIntent();
    final String action = intent.getAction();

    if (action == null) {
      GlobalPreferences fragment = GlobalPreferences.newInstance(this);
      loadPreference(fragment, false);
    } else if (EDIT_ACCOUNT_ACTION.equals(action)) {
      final String accountUuid = intent.getStringExtra(ACCOUNT_EXTRA);
      Account account = Preferences.getPreferences(this).getAccount(accountUuid);
      AccountPreferences fragment = AccountPreferences.newInstance(account);
      loadPreference(fragment, false);
    } else if (EDIT_FOLDER_ACTION.equals(action)) {
      final String accountUuid = intent.getStringExtra(ACCOUNT_EXTRA);
      Account account = Preferences.getPreferences(this).getAccount(accountUuid);
      final String folderName = intent.getStringExtra(FOLDER_EXTRA);
      // onFolderClick(account);
    }
  }
Exemple #3
0
 @Override
 public void onAccountClick(Account account) {
   AccountPreferences fragment = AccountPreferences.newInstance(account);
   loadPreference(fragment, true);
 }