Available Methods
- setText ( )
- setTextColor ( )
- setTextSize ( )
- setVisibility ( )
- setOnClickListener ( )
- setGravity ( )
- setTypeface ( )
- setPadding ( )
- setLayoutParams ( )
- setMovementMethod ( )
- setSingleLine ( )
- setEllipsize ( )
- setBackgroundResource ( )
- setMaxLines ( )
- setBackgroundColor ( )
- setLines ( )
- setTag ( )
- getText ( )
- setCompoundDrawablesWithIntrinsicBounds ( )
- setTextAppearance ( )
- setAllCaps ( )
- setPaintFlags ( )
- setId ( )
- setCompoundDrawables ( )
- getLayout ( )
- setBackgroundDrawable ( )
- setClickable ( )
- getLayoutParams ( )
- setCompoundDrawablePadding ( )
- append ( )
- getScrollX ( )
- getTotalPaddingTop ( )
- setBackground ( )
- getTextSize ( )
- setEnabled ( )
- getScrollY ( )
- getTotalPaddingLeft ( )
- getCompoundDrawables ( )
- getPaint ( )
- measure ( )
- getContext ( )
- getMeasuredWidth ( )
- setFocusable ( )
- setSelected ( )
- setAlpha ( )
- getHeight ( )
- setMinWidth ( )
- getCurrentTextColor ( )
- getPaddingRight ( )
- getWidth ( )
- setWidth ( )
- getPaddingLeft ( )
- getTag ( )
- setShadowLayer ( )
- addTextChangedListener ( )
- setAutoLinkMask ( )
- setLinkTextColor ( )
- setHeight ( )
- getVisibility ( )
- getLeft ( )
- invalidate ( )
- setMaxWidth ( )
- setOnLongClickListener ( )
- setOnTouchListener ( )
- OnEditorActionListener ( )
- getPaddingBottom ( )
- setLineSpacing ( )
- startAnimation ( )
- setTextDirection ( )
- requestLayout ( )
- setFocusableInTouchMode ( )
- setError ( )
- setTranslationY ( )
- layout ( )
- getParent ( )
- getTotalPaddingBottom ( )
- setContentDescription ( )
- setScaleY ( )
- setIncludeFontPadding ( )
- setHighlightColor ( )
- post ( )
- setCompoundDrawablesRelativeWithIntrinsicBounds ( )
- setMinHeight ( )
- getBackground ( )
- setTextIsSelectable ( )
- setTranslationX ( )
- getLineCount ( )
- BufferType ( )
- getPaddingTop ( )
- setLinksClickable ( )
- getId ( )
- setHorizontalFadingEdgeEnabled ( )
- scrollTo ( )
- setHintTextColor ( )
- setRotation ( )
- setImportantForAccessibility ( )
- getTextColors ( )
- setHint ( )
- setScaleX ( )
- postDelayed ( )
- getLineHeight ( )
- setTransformationMethod ( )
- getResources ( )
- removeTextChangedListener ( )
- setTransitionName ( )
- setCompoundDrawablesRelative ( )
- setOnFocusChangeListener ( )
- setPaddingRelative ( )
- setTextScaleX ( )
- getCompoundPaddingTop ( )
- getMeasuredHeight ( )
- setX ( )
- setTextAlignment ( )
- VISIBLE
- setMinimumWidth ( )
- getCompoundPaddingLeft ( )
- getGravity ( )
- getTypeface ( )
- setInputType ( )
- isTextSelectable ( )
- getMaxLines ( )
- draw ( )
- setLayerType ( )
- getTranslationY ( )
- getSelectionStart ( )
- getTransformationMethod ( )
- setHorizontallyScrolling ( )
- setOnDragListener ( )
- getCompoundDrawablesRelative ( )
- getPaddingStart ( )
- isSelected ( )
- setLongClickable ( )
- addOnLayoutChangeListener ( )
- getCompoundPaddingRight ( )
- setElevation ( )
- isInEditMode ( )
- setTextKeepState ( )
- getMovementMethod ( )
- getSelectionEnd ( )
- getInputType ( )
- setMinLines ( )
Related Classes
- java.io.File
- android.os.Bundle
- android.content.Context
- android.view.View
- android.util.Log
- android.content.Intent
- android.view.ViewGroup
- android.app.Activity
- android.view.LayoutInflater
- android.os.Build
- android.widget.Toast
- android.widget.ImageView
- android.graphics.Color
- android.net.Uri
- android.widget.Button
- android.graphics.Bitmap
- android.text.TextUtils
- android.view.MotionEvent
- android.graphics.drawable.Drawable
- android.widget.LinearLayout
- android.support.annotation.Nullable
- android.widget.EditText
- android.content.SharedPreferences
- android.support.annotation.NonNull
- android.annotation.SuppressLint
Java Code Examples for android.widget.TextView#removeTextChangedListener()
The following examples show how to use
android.widget.TextView#removeTextChangedListener() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FormatWatcher.java From decoro with Apache License 2.0 | 6 votes |
/** * @param textView an observable text view which content text will be formatted using * {@link * Mask} * @param initWithMask this flags defines whether hardcoded head of the mask (e.g "+7 ") will * fill the initial text of the {@code textView}. */ protected void installOn(final TextView textView, final boolean initWithMask) { if (textView == null) { throw new IllegalArgumentException("text view cannot be null"); } this.textView = textView; this.initWithMask = initWithMask; // try to remove us from listeners (useful in case user's trying to install the formatter twice on a same TextView) textView.removeTextChangedListener(this); textView.addTextChangedListener(this); this.mask = null; refreshMask(); }
Example 2
Source File: BaseViewVisitor.java From ans-android-sdk with GNU General Public License v3.0 | 5 votes |
@Override public void cleanup() { for (final Map.Entry<TextView, TextWatcher> entry : mWatching.entrySet()) { final TextView v = entry.getKey(); final TextWatcher watcher = entry.getValue(); v.removeTextChangedListener(watcher); } mWatching.clear(); }
Example 3
Source File: BaseViewVisitor.java From ans-android-sdk with GNU General Public License v3.0 | 5 votes |
@Override public void accumulate(View found) { if (found instanceof TextView) { final TextView foundTextView = (TextView) found; final TextWatcher watcher = new TrackingTextWatcher(foundTextView); final TextWatcher oldWatcher = mWatching.get(foundTextView); if (null != oldWatcher) { foundTextView.removeTextChangedListener(oldWatcher); } foundTextView.addTextChangedListener(watcher); mWatching.put(foundTextView, watcher); } }
Example 4
Source File: InputTextHelper.java From AndroidProject with Apache License 2.0 | 5 votes |
/** * 移除 TextView 监听,避免内存泄露 */ public void removeViews(TextView... views) { if (mViewSet != null && mViewSet.size() > 0) { for (TextView view : views) { view.removeTextChangedListener(this); mViewSet.remove(view); } // 触发一次监听 notifyChanged(); } }
Example 5
Source File: InputTextHelper.java From AndroidProject with Apache License 2.0 | 5 votes |
/** * 移除所有 TextView 监听,避免内存泄露 */ public void removeAllViews() { if (mViewSet == null) { return; } for (TextView view : mViewSet) { view.removeTextChangedListener(this); } mViewSet.clear(); mViewSet = null; }
Example 6
Source File: CountryCodePicker.java From CountryCodePicker with Apache License 2.0 | 5 votes |
private void setPhoneNumberWatcherToTextView(TextView textView, String countryNameCode) { if (!mIsEnablePhoneNumberWatcher) return; if (mPhoneNumberWatcher == null) { mPhoneNumberWatcher = new PhoneNumberWatcher(countryNameCode); textView.addTextChangedListener(mPhoneNumberWatcher); } else { if (!mPhoneNumberWatcher.getPreviousCountryCode().equalsIgnoreCase(countryNameCode)) { textView.removeTextChangedListener(mPhoneNumberWatcher); mPhoneNumberWatcher = new PhoneNumberWatcher(countryNameCode); textView.addTextChangedListener(mPhoneNumberWatcher); } } }
Example 7
Source File: ScalableLayout.java From ScalableLayout with Apache License 2.0 | 5 votes |
private void refreshTextChangedListener(TextView pTextView) { LayoutParams lSLLP = getChildLayoutParams(pTextView); try { pTextView.removeTextChangedListener(mTextWatcher); } catch (Throwable e) { ex(e); } if(lSLLP.mTextView_WrapContent_Direction != TextView_WrapContent_Direction.None) { pTextView.addTextChangedListener(mTextWatcher); } }
Example 8
Source File: WhatsappViewCompat.java From WhatsappFormatter with Apache License 2.0 | 2 votes |
/** * Default modifier for removing text change listener * @param textView - related text view. * @param watcher - text watcher which has to be removed. */ static void removeTextChangedListener(TextView textView, TextWatcher watcher) { textView.removeTextChangedListener(watcher); }