本文整理汇总了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);
}
示例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;
}