android.support.design.widget.TextInputLayout.getEditText()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中android.support.design.widget.TextInputLayout.getEditText()方法的一些代码示例,展示了TextInputLayout.getEditText()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextInputLayout.getEditText()方法的具体详情如下:
包路径:android.support.design.widget.TextInputLayout
类名称:TextInputLayout
方法名:getEditText

TextInputLayout.getEditText介绍

暂无

代码示例

代码示例来源:origin: north2016/T-MVP

private void doAction() {
  String name = mViewBinding.tlName.getEditText().getText().toString();
  String pass = mViewBinding.tlPass.getEditText().getText().toString();
  String msg = TextUtils.isEmpty(name) ? "用户名不能为空!" : TextUtils.isEmpty(pass) ? "密码不能为空!" : "";
  if (!TextUtils.isEmpty(msg)) showMsg(msg);
  else if (isLogin) mPresenter.login(name, pass);
  else mPresenter.sign(name, pass);
}

代码示例来源:origin: seven332/EhViewer

public void setDialog(AlertDialog dialog) {
  mDialog = dialog;
  mSpinner = (Spinner) ViewUtils.$$(dialog, R.id.spinner);
  mInputLayout = (TextInputLayout) ViewUtils.$$(dialog, R.id.text_input_layout);
  mEditText = mInputLayout.getEditText();
  View button = dialog.getButton(DialogInterface.BUTTON_POSITIVE);
  if (null != button) {
    button.setOnClickListener(this);
  }
}

代码示例来源:origin: seven332/EhViewer

View view = inflater.inflate(R.layout.scene_cookie_sign_in, container, false);
mIpbMemberIdLayout = (TextInputLayout) ViewUtils.$$(view, R.id.ipb_member_id_layout);
mIpbMemberId = mIpbMemberIdLayout.getEditText();
AssertUtils.assertNotNull(mIpbMemberId);
mIpbPassHashLayout = (TextInputLayout) ViewUtils.$$(view, R.id.ipb_pass_hash_layout);
mIpbPassHash = mIpbPassHashLayout.getEditText();
AssertUtils.assertNotNull(mIpbPassHash);
mIgneousLayout = (TextInputLayout) ViewUtils.$$(view, R.id.igneous_layout);
mIgneous = mIgneousLayout.getEditText();
AssertUtils.assertNotNull(mIgneous);
mOk = ViewUtils.$$(view, R.id.ok);

代码示例来源:origin: seven332/EhViewer

mProgress = ViewUtils.$$(view, R.id.progress);
mUsernameLayout = (TextInputLayout) ViewUtils.$$(loginForm, R.id.username_layout);
mUsername = mUsernameLayout.getEditText();
AssertUtils.assertNotNull(mUsername);
mPasswordLayout = (TextInputLayout) ViewUtils.$$(loginForm, R.id.password_layout);
mPassword = mPasswordLayout.getEditText();
AssertUtils.assertNotNull(mPassword);
mRecaptcha = (EditText) ViewUtils.$$(loginForm, R.id.recaptcha);

代码示例来源:origin: alexive/visual-goodies

/**
 * Creates a new TextInputDialog
 * @param context
 */
public TextInputDialog(Context context){
  mDialog = new AlertDialog.Builder(context);
  this.mDialogView = (TextInputLayout) LayoutInflater.from(context)
      .inflate(R.layout.dialog_text_input, null);
  editText = mDialogView.getEditText();
  this.mDialog.setView(this.mDialogView);
}

代码示例来源:origin: alexive/visual-goodies

public String getText(){
  return mDialogView.getEditText().getText().toString();
}

代码示例来源:origin: alexive/visual-goodies

@Override
  public void onShow(DialogInterface dialog) {
    //Just to update the positive's button visibility in case the dev want's
    //just non blank-space input.
    watcher.onTextChanged(mDialogView.getEditText().getText().toString(), 0, 0, 0);
  }
});

代码示例来源:origin: amahi/android

private EditText getPasswordEdit() {
  TextInputLayout password_layout = findViewById(R.id.password_layout);
  return password_layout.getEditText();
}

代码示例来源:origin: amahi/android

private EditText getUsernameEdit() {
  TextInputLayout username_layout = findViewById(R.id.username_layout);
  return username_layout.getEditText();
}

代码示例来源:origin: k0shk0sh/Android-MVP-for-dummies

@Override
  public void onClick(View v) {
    Random random = new Random();
    getLoginPresenter().onLoginClick(email.getEditText().getText().toString(),
        password.getEditText().getText().toString(), random.nextInt(2) == 1);
  }
});

代码示例来源:origin: ymback/NGA-CLIENT-VER-OPEN-SOURCE

@Override
  public void onClick(DialogInterface dialog, int which) {
    mAuthCodeLoadCallback.login(mAuthCodeEditView.getEditText().getText().toString());
  }
})

代码示例来源:origin: akshayejh/Lapit---Android-Firebase-Chat-App

@Override
  public void onClick(View view) {
    String email = mLoginEmail.getEditText().getText().toString();
    String password = mLoginPassword.getEditText().getText().toString();
    if(!TextUtils.isEmpty(email) || !TextUtils.isEmpty(password)){
      mLoginProgress.setTitle("Logging In");
      mLoginProgress.setMessage("Please wait while we check your credentials.");
      mLoginProgress.setCanceledOnTouchOutside(false);
      mLoginProgress.show();
      loginUser(email, password);
    }
  }
});

代码示例来源:origin: skylineTan/MaterialContacts

@Override protected void initViewsAndEvents() {
  initToolbar();
  mContact = getIntent().getParcelableExtra(Constants.Extras.CONTACT);
  if(mContact != null){
    addContactName.getEditText().setText(mContact.getName());
    addContactNickName.getEditText().setText(mContact.getNickName());
    addContactPhone.getEditText().setText(mContact.getPhoneNumber());
    addContactEmail.getEditText().setText(mContact.getEmail());
    addContactAddress.getEditText().setText(mContact.getAddress());
  }
}

代码示例来源:origin: GitLqr/MaterialDesignDemo

@Override
  public void afterTextChanged(Editable s) {
    if (mTextInputLayout.getEditText().getText().toString().trim().length() > 6) {
      mTextInputLayout.setErrorEnabled(true);
      mTextInputLayout.setError(mErrorTip);
    } else {
      mTextInputLayout.setErrorEnabled(false);
    }
  }
}

代码示例来源:origin: azhon/SmackChat

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_register);
  ButterKnife.bind(this);
  initToolBar(true, "注册");
  bindService();
  register.setOnClickListener(this);
  name = username.getEditText();
  psd = password.getEditText();
}

代码示例来源:origin: evernote/evernote-sdk-android

@Override
  public void onClick(DialogInterface dialog, int which) {
    switch (which) {
      case DialogInterface.BUTTON_POSITIVE:
        new CreateNewNotebookTask(titleView.getEditText().getText().toString())
            .start(getParentFragment());
        break;
    }
  }
};

代码示例来源:origin: azhon/SmackChat

@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_login);
  ButterKnife.bind(this);
  initToolBar(false, "登录");
  login.setOnClickListener(this);
  register.setOnClickListener(this);
  user = username.getEditText();
  psd = password.getEditText();
  bindService();
  loginResult();
}

代码示例来源:origin: evernote/evernote-sdk-android

@Override
  public void onClick(DialogInterface dialog, int which) {
    switch (which) {
      case DialogInterface.BUTTON_POSITIVE:
        if (getParentFragment() instanceof NoteContainerFragment) {
          ((NoteContainerFragment) getParentFragment()).search(titleView.getEditText().getText().toString());
        } else {
          throw new IllegalStateException();
        }
        break;
    }
  }
};

代码示例来源:origin: GitLqr/MaterialDesignDemo

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_text_input_layout);
  mTextInputLayout = (TextInputLayout) findViewById(R.id.textInputLayout);
  //开启计数
  mTextInputLayout.setCounterEnabled(true);
  mTextInputLayout.setCounterMaxLength(6);
  //定义错误提示
  mTextInputLayout.getEditText().addTextChangedListener(new MyTextWatch(mTextInputLayout, "长度不能超过6个字符"));
}

代码示例来源:origin: journey-M/AutoMissingMessage

private void initView() {
  msgweQueeView = (MessagQuenView) findViewById(R.id.msgQuenView);
  thumbContainer = (RelativeLayout) findViewById(R.id.thumbContainer);
  txtLayout = (TextInputLayout) findViewById(R.id.txtLayout);
  mEdMsg = txtLayout.getEditText();
  txtLayout.setHint("输入要发送的消息内容");
  btnSendMsg = (Button) findViewById(R.id.btn_sendmsg);
  btnThumbs = (Button) findViewById(R.id.btn_thumb);
  btnJoin = (Button) findViewById(R.id.btn_join);
  btnThumbs.setOnClickListener(this);
  btnSendMsg.setOnClickListener(this);
  btnJoin.setOnClickListener(this);
  Toast.makeText(this, "a", Toast.LENGTH_SHORT).show();
}

相关文章