當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。