当前位置: 首页>>代码示例>>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;未经允许,请勿转载。