当前位置: 首页>>代码示例>>Java>>正文


Java TLRPC.TL_account_noPassword方法代码示例

本文整理汇总了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("");
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:52,代码来源:TwoStepVerificationActivity.java


注:本文中的org.telegram.tgnet.TLRPC.TL_account_noPassword方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。