本文整理汇总了Java中org.telegram.tgnet.TLRPC.TL_account_noPassword方法的典型用法代码示例。如果您正苦于以下问题:Java TLRPC.TL_account_noPassword方法的具体用法?Java TLRPC.TL_account_noPassword怎么用?Java TLRPC.TL_account_noPassword使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.telegram.tgnet.TLRPC
的用法示例。
在下文中一共展示了TLRPC.TL_account_noPassword方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setPasswordSetState
import org.telegram.tgnet.TLRPC; //导入方法依赖的package包/类
private void setPasswordSetState(int state) {
if (passwordEditText == null) {
return;
}
passwordSetState = state;
if (passwordSetState == 0) {
actionBar.setTitle(LocaleController.getString("YourPassword", R.string.YourPassword));
if (currentPassword instanceof TLRPC.TL_account_noPassword) {
titleTextView.setText(LocaleController.getString("PleaseEnterFirstPassword", R.string.PleaseEnterFirstPassword));
} else {
titleTextView.setText(LocaleController.getString("PleaseEnterPassword", R.string.PleaseEnterPassword));
}
passwordEditText.setImeOptions(EditorInfo.IME_ACTION_NEXT);
passwordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
bottomTextView.setVisibility(View.INVISIBLE);
bottomButton.setVisibility(View.INVISIBLE);
} else if (passwordSetState == 1) {
actionBar.setTitle(LocaleController.getString("YourPassword", R.string.YourPassword));
titleTextView.setText(LocaleController.getString("PleaseReEnterPassword", R.string.PleaseReEnterPassword));
passwordEditText.setImeOptions(EditorInfo.IME_ACTION_NEXT);
passwordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance());
bottomTextView.setVisibility(View.INVISIBLE);
bottomButton.setVisibility(View.INVISIBLE);
} else if (passwordSetState == 2) {
actionBar.setTitle(LocaleController.getString("PasswordHint", R.string.PasswordHint));
titleTextView.setText(LocaleController.getString("PasswordHintText", R.string.PasswordHintText));
passwordEditText.setImeOptions(EditorInfo.IME_ACTION_NEXT);
passwordEditText.setTransformationMethod(null);
bottomTextView.setVisibility(View.INVISIBLE);
bottomButton.setVisibility(View.INVISIBLE);
} else if (passwordSetState == 3) {
actionBar.setTitle(LocaleController.getString("RecoveryEmail", R.string.RecoveryEmail));
titleTextView.setText(LocaleController.getString("YourEmail", R.string.YourEmail));
passwordEditText.setImeOptions(EditorInfo.IME_ACTION_DONE);
passwordEditText.setTransformationMethod(null);
passwordEditText.setInputType(EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
bottomTextView.setVisibility(View.VISIBLE);
bottomButton.setVisibility(emailOnly ? View.INVISIBLE : View.VISIBLE);
} else if (passwordSetState == 4) {
actionBar.setTitle(LocaleController.getString("PasswordRecovery", R.string.PasswordRecovery));
titleTextView.setText(LocaleController.getString("PasswordCode", R.string.PasswordCode));
bottomTextView.setText(LocaleController.getString("RestoreEmailSentInfo", R.string.RestoreEmailSentInfo));
bottomButton.setText(LocaleController.formatString("RestoreEmailTrouble", R.string.RestoreEmailTrouble, currentPassword.email_unconfirmed_pattern));
passwordEditText.setImeOptions(EditorInfo.IME_ACTION_DONE);
passwordEditText.setTransformationMethod(null);
passwordEditText.setInputType(InputType.TYPE_CLASS_PHONE);
bottomTextView.setVisibility(View.VISIBLE);
bottomButton.setVisibility(View.VISIBLE);
}
passwordEditText.setText("");
}