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


Java TextInputLayout.getEditText方法代码示例

本文整理汇总了Java中android.support.design.widget.TextInputLayout.getEditText方法的典型用法代码示例。如果您正苦于以下问题:Java TextInputLayout.getEditText方法的具体用法?Java TextInputLayout.getEditText怎么用?Java TextInputLayout.getEditText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.design.widget.TextInputLayout的用法示例。


在下文中一共展示了TextInputLayout.getEditText方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: changePacketSelection

import android.support.design.widget.TextInputLayout; //导入方法依赖的package包/类
private void changePacketSelection(@NonNull Packet packet) {
  final LayoutInflater inflater = getLayoutInflater();
  final ViewGroup formContainer = this.formContainer;
  TransitionManager.beginDelayedTransition(formContainer, new AutoTransition().setDuration(150));
  formContainer.removeAllViews();
  final PacketParameter[] parameters = packet.parameters;
  final int paramLen = parameters.length;
  for (int i = 0; i < paramLen; i++) {
    final PacketParameter param = parameters[i];
    final TextInputLayout inputLayout = (TextInputLayout) inflater.inflate(R.layout.input_field, formContainer, false);
    inputLayout.setTag(param);
    inputLayout.setHint(param.id());
    final EditText inputField = inputLayout.getEditText();
    if (inputField != null) {
      inputField.setText(param.value());
    }
    formContainer.addView(inputLayout);
  }
}
 
开发者ID:swedbank,项目名称:android-banklink,代码行数:20,代码来源:MainActivity.java

示例2: initViews

import android.support.design.widget.TextInputLayout; //导入方法依赖的package包/类
private void initViews()
{
    mEmailWrapper = (TextInputLayout) findViewById(R.id.user_email_wrapper_register);
    mPasswordWrapper = (TextInputLayout) findViewById(R.id.user_password_wrapper);
    mFirstNameWrapper = (TextInputLayout) findViewById(R.id.user_first_name_wrapper);
    mLastNameWrapper = (TextInputLayout) findViewById(R.id.user_last_name_wrapper);
    mConfirmWrapper = (TextInputLayout) findViewById(R.id.password_confirm_wrapper);

    mVehichleTypeSpinner = (Spinner) findViewById(R.id.SpinnerVehicleType);
    mRouteSpinner = (Spinner) findViewById(R.id.SpinnerRoute);


    mEmaiEdit = mEmailWrapper.getEditText();
    mPasswordEdit = mPasswordWrapper.getEditText();
    mConfirmEdit = mConfirmWrapper.getEditText();
    mFirstNameEdit = mFirstNameWrapper.getEditText();
    mLastNameEdit = mLastNameWrapper.getEditText();
    mRegisterBtn = (Button) findViewById(R.id.btn_signup);
    mLinkLogin = (TextView) findViewById(R.id.link_login);

    mRegisterBtn.setOnClickListener(this);
    mLinkLogin.setOnClickListener(this);
}
 
开发者ID:PalisadoesFoundation,项目名称:do-road,代码行数:24,代码来源:RegisterActivity.java

示例3: getAnswers

import android.support.design.widget.TextInputLayout; //导入方法依赖的package包/类
public List<String> getAnswers() {
	List<String> answers = new ArrayList<>();

	if (questionEditText == null || TextUtils.isEmpty(questionEditText.getText())) {
		return answers;
	}

	for (int i = 0; i < inputLayout.getChildCount(); ++i) {
		if (inputLayout.getChildAt(i) instanceof TextInputLayout) {
			TextInputLayout til = (TextInputLayout) inputLayout.getChildAt(i);
			EditText editText = til.getEditText();
			if(editText!=null){
				answers.add(editText.getEditableText().toString());
			}
		}
	}
	return answers;
}
 
开发者ID:Komdosh,项目名称:SocEltech,代码行数:19,代码来源:QuestionFragment.java

示例4: AbstractValidator

import android.support.design.widget.TextInputLayout; //导入方法依赖的package包/类
AbstractValidator(TextInputLayout layout, String errorMessage) {
    this.layout = layout;
    this.editText = layout.getEditText();
    this.errorMessage = errorMessage;
    this.hasError = false;

    addTextChangeListener();
}
 
开发者ID:WellingtonCosta,项目名称:convalida,代码行数:9,代码来源:AbstractValidator.java

示例5: onCreateDialog

import android.support.design.widget.TextInputLayout; //导入方法依赖的package包/类
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {

    // creazione 'manuale' del dialog
    int margin = getResources().getDimensionPixelSize(R.dimen.activity_horizontal_margin);

    LinearLayout rootView = new LinearLayout(getActivity());
    rootView.setOrientation(LinearLayout.VERTICAL);
    rootView.setPadding(margin, margin, margin, margin);
    mTxtInput = new TextInputLayout(getActivity());
    mTxtInput.addView(new EditText(getActivity()));
    mTxtInput.setHint(getString(R.string.api_key_title));
    if (mTxtInput.getEditText() != null) {
        mTxtInput.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
        mTxtInput.getEditText().setHighlightColor(Color.YELLOW);
    }

    rootView.addView(mTxtInput);

    // Setto l'edit text con il testo dell'api key se presente
    String apiKey = SharedPrefsHelper.getInstance().getApiKey(getActivity());
    if(apiKey != null)
        mTxtInput.getEditText().setText(apiKey);

    AlertDialog dialog = new AlertDialog.Builder(getActivity())
            .setTitle(getString(R.string.title_insert_api_key))
            .setView(rootView)
            //.setCancelable(false)
            .setPositiveButton(getString(R.string.salva), null)
            .setNegativeButton(SharedPrefsHelper.getInstance()
                    .isApiKeyRegistered(getActivity()) ? getString(R.string.annulla) : getString(R.string.esci_app), this)
            .create();

    dialog.setOnShowListener(this);

    return dialog;
}
 
开发者ID:IelloDevTeam,项目名称:IelloAndroidAdminApp,代码行数:39,代码来源:DialogAPIKey.java

示例6: ConfirmPasswordValidator

import android.support.design.widget.TextInputLayout; //导入方法依赖的package包/类
public ConfirmPasswordValidator(TextInputLayout passwordLayout, TextInputLayout confirmPasswordLayout, String errorMessage) {
    super(confirmPasswordLayout, errorMessage);
    this.passwordEditText = passwordLayout.getEditText();
}
 
开发者ID:WellingtonCosta,项目名称:convalida,代码行数:5,代码来源:ConfirmPasswordValidator.java

示例7: toString

import android.support.design.widget.TextInputLayout; //导入方法依赖的package包/类
public static String toString(@NonNull TextInputLayout textInputLayout) {
    return textInputLayout.getEditText() != null ? toString(textInputLayout.getEditText()) : "";
}
 
开发者ID:duyp,项目名称:mvvm-template,代码行数:4,代码来源:InputHelper.java


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