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


Java AppCompatEditText.addTextChangedListener方法代码示例

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


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

示例1: onCreateView

import android.support.v7.widget.AppCompatEditText; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
                         @Nullable Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_buildprop_search, container, false);

    AppCompatEditText keyEdit = (AppCompatEditText) rootView.findViewById(R.id.key_edittext);
    AppCompatEditText valueEdit = (AppCompatEditText) rootView.findViewById(R.id.value_edittext);

    keyEdit.addTextChangedListener(mKeyWatcher);
    valueEdit.addTextChangedListener(mValueWatcher);

    if (mKeyText != null) {
        keyEdit.append(mKeyText);
    }
    if (mValueText != null) {
        valueEdit.append(mValueText);
    }

    mItemsText = (TextView) rootView.findViewById(R.id.found_text);
    setCount(mItemsCount);

    return rootView;
}
 
开发者ID:morogoku,项目名称:MTweaks-KernelAdiutorMOD,代码行数:25,代码来源:BuildpropFragment.java

示例2: onViewCreated

import android.support.v7.widget.AppCompatEditText; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    editGeohash = (AppCompatEditText) view.findViewById(R.id.edit_hash);
    editLat = (AppCompatEditText) view.findViewById(R.id.edit_lat);
    editLon = (AppCompatEditText) view.findViewById(R.id.edit_lon);
    textPrecision = (AppCompatTextView) view.findViewById(R.id.text_precision);
    seekPrecision = (AppCompatSeekBar) view.findViewById(R.id.seek_precision);

    editGeohash.addTextChangedListener(hashTextWatcher);
    editLat.addTextChangedListener(locationTextWatcher);
    editLon.addTextChangedListener(locationTextWatcher);
    seekPrecision.setOnSeekBarChangeListener(this);

    location = new Location("geohash_example");
    textPrecision.setText("Precision: " + 1);
}
 
开发者ID:drfonfon,项目名称:android-geohash,代码行数:18,代码来源:ConverterFragment.java

示例3: MageNumberControl

import android.support.v7.widget.AppCompatEditText; //导入方法依赖的package包/类
public MageNumberControl(Context context, AttributeSet attrs, double min, double max) {
	super(context, attrs);

	this.min = min;
	this.max = max;
	this.propertyType = MagePropertyType.NUMBER;

	AppCompatEditText editText = new AppCompatEditText(context, attrs);
	editText.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
	editText.addTextChangedListener(this);
	addView(editText);

	TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.MageFormElement);
	setPropertyKey(typedArray.getString(R.styleable.MageFormElement_propertyKey));
	setPropertyType(MagePropertyType.getPropertyType(typedArray.getInt(R.styleable.MageFormElement_propertyType, 0)));
	typedArray.recycle();
}
 
开发者ID:ngageoint,项目名称:mage-android,代码行数:18,代码来源:MageNumberControl.java

示例4: MageSelectView

import android.support.v7.widget.AppCompatEditText; //导入方法依赖的package包/类
public MageSelectView(Context context, AttributeSet attrs, JsonObject jsonObject, Boolean isMultiSelect) {
    super(context, attrs);
    this.jsonObject = jsonObject;
    this.isMultiSelect = isMultiSelect;

    AppCompatEditText editText = new AppCompatEditText(context, attrs);
    editText.setFocusableInTouchMode(false);
    editText.setFocusable(true);
    editText.setTextIsSelectable(false);
    editText.setCursorVisible(false);
    editText.setClickable(false);
    editText.addTextChangedListener(this);
    addView(editText);

    TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.MageFormElement);
    setPropertyKey(typedArray.getString(R.styleable.MageFormElement_propertyKey));
    setPropertyType(MagePropertyType.getPropertyType(typedArray.getInt(R.styleable.MageFormElement_propertyType, 0)));
    typedArray.recycle();
}
 
开发者ID:ngageoint,项目名称:mage-android,代码行数:20,代码来源:MageSelectView.java

示例5: FormElementTextMultiLineViewHolder

import android.support.v7.widget.AppCompatEditText; //导入方法依赖的package包/类
public FormElementTextMultiLineViewHolder(View v, FormItemEditTextListener listener) {
    super(v);
    mTextViewTitle = (AppCompatTextView) v.findViewById(R.id.formElementTitle);
    mEditTextValue = (AppCompatEditText) v.findViewById(R.id.formElementValue);
    mFormCustomEditTextListener = listener;
    mEditTextValue.addTextChangedListener(mFormCustomEditTextListener);
    mEditTextValue.setMaxLines(4);
    mEditTextValue.setSingleLine(false);
    mEditTextValue.setInputType(InputType.TYPE_CLASS_TEXT|InputType.TYPE_TEXT_FLAG_MULTI_LINE);
}
 
开发者ID:adib2149,项目名称:FormMaster,代码行数:11,代码来源:FormElementTextMultiLineViewHolder.java

示例6: FormElementTextPhoneViewHolder

import android.support.v7.widget.AppCompatEditText; //导入方法依赖的package包/类
public FormElementTextPhoneViewHolder(View v, FormItemEditTextListener listener) {
    super(v);
    mTextViewTitle = (AppCompatTextView) v.findViewById(R.id.formElementTitle);
    mEditTextValue = (AppCompatEditText) v.findViewById(R.id.formElementValue);
    mFormCustomEditTextListener = listener;
    mEditTextValue.addTextChangedListener(mFormCustomEditTextListener);
    mEditTextValue.setRawInputType(InputType.TYPE_CLASS_PHONE|InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
}
 
开发者ID:adib2149,项目名称:FormMaster,代码行数:9,代码来源:FormElementTextPhoneViewHolder.java

示例7: FormElementTextPasswordViewHolder

import android.support.v7.widget.AppCompatEditText; //导入方法依赖的package包/类
public FormElementTextPasswordViewHolder(View v, FormItemEditTextListener listener) {
    super(v);
    mTextViewTitle = (AppCompatTextView) v.findViewById(R.id.formElementTitle);
    mEditTextValue = (AppCompatEditText) v.findViewById(R.id.formElementValue);
    mFormCustomEditTextListener = listener;
    mEditTextValue.addTextChangedListener(mFormCustomEditTextListener);
    mEditTextValue.setRawInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD|InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
}
 
开发者ID:adib2149,项目名称:FormMaster,代码行数:9,代码来源:FormElementTextPasswordViewHolder.java

示例8: FormElementTextNumberViewHolder

import android.support.v7.widget.AppCompatEditText; //导入方法依赖的package包/类
public FormElementTextNumberViewHolder(View v, FormItemEditTextListener listener) {
    super(v);
    mTextViewTitle = (AppCompatTextView) v.findViewById(R.id.formElementTitle);
    mEditTextValue = (AppCompatEditText) v.findViewById(R.id.formElementValue);
    mFormCustomEditTextListener = listener;
    mEditTextValue.addTextChangedListener(mFormCustomEditTextListener);
    mEditTextValue.setRawInputType(InputType.TYPE_CLASS_NUMBER|InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
}
 
开发者ID:adib2149,项目名称:FormMaster,代码行数:9,代码来源:FormElementTextNumberViewHolder.java

示例9: FormElementTextEmailViewHolder

import android.support.v7.widget.AppCompatEditText; //导入方法依赖的package包/类
public FormElementTextEmailViewHolder(View v, FormItemEditTextListener listener) {
    super(v);
    mTextViewTitle = (AppCompatTextView) v.findViewById(R.id.formElementTitle);
    mEditTextValue = (AppCompatEditText) v.findViewById(R.id.formElementValue);
    mFormCustomEditTextListener = listener;
    mEditTextValue.addTextChangedListener(mFormCustomEditTextListener);
    mEditTextValue.setRawInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS|InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
}
 
开发者ID:adib2149,项目名称:FormMaster,代码行数:9,代码来源:FormElementTextEmailViewHolder.java

示例10: FormElementTextSingleLineViewHolder

import android.support.v7.widget.AppCompatEditText; //导入方法依赖的package包/类
public FormElementTextSingleLineViewHolder(View v, FormItemEditTextListener listener) {
    super(v);
    mTextViewTitle = (AppCompatTextView) v.findViewById(R.id.formElementTitle);
    mEditTextValue = (AppCompatEditText) v.findViewById(R.id.formElementValue);
    mFormCustomEditTextListener = listener;
    mEditTextValue.addTextChangedListener(mFormCustomEditTextListener);
    mEditTextValue.setMaxLines(1);
}
 
开发者ID:adib2149,项目名称:FormMaster,代码行数:9,代码来源:FormElementTextSingleLineViewHolder.java

示例11: onCreateView

import android.support.v7.widget.AppCompatEditText; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    View rootView=null;
    final String content = getArguments().getString(ARG_CONTENT);
    switch (getArguments().getInt(ARG_SECTION_NUMBER)) {
        case TYPE_EDIT:
            showHelp(container);
            rootView = inflater.inflate(R.layout.fragment_markdown, container, false);
            edit =(AppCompatEditText) rootView.findViewById(R.id.markdown_edit);
            edit.requestFocus();
            if(content !=null){
                edit.setText(content);
                historyList.add(new History(0,content));
            }
            edit.addTextChangedListener(textWatcher);
            break;
        case TYPE_VIEW:
            showHelp(container);
            rootView=inflater.inflate(R.layout.fragment_webview,container,false);
            webView=(MarkDownWebView) rootView.findViewById(R.id.web_view);
            webView.ini();
            webView.setBackgroundColor(AppPreferenceUtil.getEditBgColor());

            webView.loadUrl("file:///android_asset/markdown.html");
            webView.postDelayed(new Runnable() {
                @Override
                public void run() {
                    parseMarkdown(content);
                    getView().findViewById(R.id.loading_bg).setVisibility(View.GONE);
                    getView().findViewById(R.id.actual_view).setVisibility(View.VISIBLE);
                }
            },300);
    }
    return rootView;
}
 
开发者ID:tianyuan168326,项目名称:nono-android,代码行数:37,代码来源:MarkdownNoteEditActivity.java

示例12: MageEditText

import android.support.v7.widget.AppCompatEditText; //导入方法依赖的package包/类
public MageEditText(Context context, AttributeSet attrs, int defStyleAttr) {
	super(context, attrs);

	dateFormat = DateFormatFactory.format("yyyy-MM-dd HH:mm zz", Locale.getDefault(), context);
	AppCompatEditText editText = new AppCompatEditText(context, attrs);
	addView(editText);

	editText.addTextChangedListener(this);

	TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.MageFormElement);
	setPropertyKey(typedArray.getString(R.styleable.MageFormElement_propertyKey));
	setPropertyType(MagePropertyType.getPropertyType(typedArray.getInt(R.styleable.MageFormElement_propertyType, 0)));
	typedArray.recycle();
}
 
开发者ID:ngageoint,项目名称:mage-android,代码行数:15,代码来源:MageEditText.java

示例13: onCreateDialogLayout

import android.support.v7.widget.AppCompatEditText; //导入方法依赖的package包/类
private void onCreateDialogLayout(@Nullable String restoredName) {
    mInputLayout = new TextInputLayout(getContext());
    mEditText = new AppCompatEditText(getContext());

    mEditText.setInputType(InputType.TYPE_CLASS_TEXT);
    mEditText.setHint(R.string.hint_playlist_name);
    mEditText.setText(restoredName);

    mInputLayout.addView(mEditText);
    mInputLayout.setErrorEnabled(true);

    mEditText.addTextChangedListener(this);
}
 
开发者ID:marverenic,项目名称:Jockey,代码行数:14,代码来源:CreatePlaylistDialogFragment.java


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