本文整理匯總了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;
}
示例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);
}
示例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();
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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();
}
示例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);
}