Пример #1
0
  public void setConversation(long threadId, long rowId, String pattern, boolean animate) {
    MessageListFragment fragment =
        MessageListFragment.getInstance(threadId, rowId, pattern, !animate);

    // Save the thread ID here and switch the content
    sThreadShowing = threadId;
    switchContent(fragment, animate);
  }
Пример #2
0
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
      case android.R.id.home:
        onKeyUp(KeyEvent.KEYCODE_BACK, null);
        break;
      case R.id.menu_settings:
        switchContent(SettingsFragment.newInstance(R.xml.settings_main), true);
        break;
      case R.id.menu_search:
        switchContent(new SearchFragment(), true);
        break;
      case R.id.menu_changelog:
        DialogHelper.showChangelog(this);
        break;
      case R.id.menu_donate:
        DonationManager.getInstance(this).showDonateDialog();
        break;
    }

    return super.onOptionsItemSelected(item);
  }