當前位置: 首頁>>代碼示例>>Java>>正文


Java RegistrationActivity類代碼示例

本文整理匯總了Java中org.thoughtcrime.securesms.RegistrationActivity的典型用法代碼示例。如果您正苦於以下問題:Java RegistrationActivity類的具體用法?Java RegistrationActivity怎麽用?Java RegistrationActivity使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


RegistrationActivity類屬於org.thoughtcrime.securesms包,在下文中一共展示了RegistrationActivity類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: PushRegistrationReminder

import org.thoughtcrime.securesms.RegistrationActivity; //導入依賴的package包/類
public PushRegistrationReminder(final Context context, final MasterSecret masterSecret) {
  super(context.getString(R.string.reminder_header_push_title),
        context.getString(R.string.reminder_header_push_text));

  final OnClickListener okListener = new OnClickListener() {
    @Override
    public void onClick(View v) {
      Intent intent = new Intent(context, RegistrationActivity.class);
      intent.putExtra("master_secret", masterSecret);
      intent.putExtra("cancel_button", true);
      context.startActivity(intent);
    }
  };

  setOkListener(okListener);
}
 
開發者ID:XecureIT,項目名稱:PeSanKita-android,代碼行數:17,代碼來源:PushRegistrationReminder.java

示例2: onPreferenceChange

import org.thoughtcrime.securesms.RegistrationActivity; //導入依賴的package包/類
@Override
public boolean onPreferenceChange(final Preference preference, Object newValue) {
  if (((CheckBoxPreference)preference).isChecked()) {
    AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
    builder.setIconAttribute(R.attr.dialog_info_icon);
    builder.setTitle(R.string.ApplicationPreferencesActivity_disable_signal_messages_and_calls);
    builder.setMessage(R.string.ApplicationPreferencesActivity_disable_signal_messages_and_calls_by_unregistering);
    builder.setNegativeButton(android.R.string.cancel, null);
    builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
      @Override
      public void onClick(DialogInterface dialog, int which) {
        new DisablePushMessagesTask((CheckBoxPreference)preference).execute();
      }
    });
    builder.show();
  } else {
    Intent nextIntent = new Intent(getActivity(), ApplicationPreferencesActivity.class);

    Intent intent = new Intent(getActivity(), RegistrationActivity.class);
    intent.putExtra("cancel_button", true);
    intent.putExtra("next_intent", nextIntent);
    intent.putExtra("master_secret", masterSecret);
    startActivity(intent);
  }

  return false;
}
 
開發者ID:XecureIT,項目名稱:PeSanKita-android,代碼行數:28,代碼來源:AdvancedPreferenceFragment.java


注:本文中的org.thoughtcrime.securesms.RegistrationActivity類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。