本文整理了Java中android.widget.TextView.removeTextChangedListener()
方法的一些代码示例,展示了TextView.removeTextChangedListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextView.removeTextChangedListener()
方法的具体详情如下:
包路径:android.widget.TextView
类名称:TextView
方法名:removeTextChangedListener
暂无
代码示例来源:origin: facebook/stetho
public void unhook() {
if (mElement != null) {
mElement.removeTextChangedListener(this);
mElement = null;
}
}
代码示例来源:origin: robolectric/robolectric
@Implementation
protected void removeTextChangedListener(TextWatcher watcher) {
this.watchers.remove(watcher);
directlyOn(realTextView, TextView.class).removeTextChangedListener(watcher);
}
代码示例来源:origin: grantland/android-autofittextview
/**
* Set the enabled state of automatically resizing text.
*/
public AutofitHelper setEnabled(boolean enabled) {
if (mEnabled != enabled) {
mEnabled = enabled;
if (enabled) {
mTextView.addTextChangedListener(mTextWatcher);
mTextView.addOnLayoutChangeListener(mOnLayoutChangeListener);
autofit();
} else {
mTextView.removeTextChangedListener(mTextWatcher);
mTextView.removeOnLayoutChangeListener(mOnLayoutChangeListener);
mTextView.setTextSize(TypedValue.COMPLEX_UNIT_PX, mTextSize);
}
}
return this;
}
代码示例来源:origin: robolectric/robolectric
@Test
public void removeTextChangedListener_shouldRemoveTheListener() throws Exception {
MockTextWatcher watcher = new MockTextWatcher();
textView.addTextChangedListener(watcher);
assertTrue(shadowOf(textView).getWatchers().contains(watcher));
textView.removeTextChangedListener(watcher);
assertFalse(shadowOf(textView).getWatchers().contains(watcher));
}
代码示例来源:origin: mixi-inc/AndroidTraining
@Override
protected void onStop() {
TextView title = (TextView) findViewById(R.id.TitleEditor);
TextView content = (TextView) findViewById(R.id.ContentEditor);
title.removeTextChangedListener(this);
content.removeTextChangedListener(this);
super.onStop();
}
代码示例来源:origin: TinkoffCreditSystems/decoro
public void removeFromTextView() {
if (textView != null) {
this.textView.removeTextChangedListener(this);
this.textView = null;
}
}
代码示例来源:origin: sharish/WhatsappFormatter
/**
* 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);
}
代码示例来源:origin: zeleven/mua
/**
* Disconnect this undo/redo from the text view.
*/
public void disconnect() {
mTextView.removeTextChangedListener(mChangeListener);
}
代码示例来源:origin: youxiaochen/ContactList
@Override
protected void onUnsubscribe() {
mTextView.removeTextChangedListener(watcher);
}
});
代码示例来源:origin: SmartDengg/sug-debounce
@Override public void cancel() throws Exception {
textView.removeTextChangedListener(watcher);
}
});
代码示例来源:origin: SmartDengg/sug-debounce
@Override public void cancel() throws Exception {
textView.removeTextChangedListener(watcher);
}
});
代码示例来源:origin: nurkiewicz/rxjava-book-examples
@Override protected void onUnsubscribe() {
view.removeTextChangedListener(watcher);
}
});
代码示例来源:origin: nurkiewicz/rxjava-book-examples
@Override protected void onUnsubscribe() {
view.removeTextChangedListener(watcher);
}
});
代码示例来源:origin: nurkiewicz/rxjava-book-examples
@Override protected void onUnsubscribe() {
view.removeTextChangedListener(watcher);
}
});
代码示例来源:origin: org.robolectric/shadows-core-v23
@Implementation
public void removeTextChangedListener(TextWatcher watcher) {
this.watchers.remove(watcher);
directlyOn(realTextView, TextView.class).removeTextChangedListener(watcher);
}
代码示例来源:origin: org.robolectric/shadows-core
@Implementation
public void removeTextChangedListener(TextWatcher watcher) {
this.watchers.remove(watcher);
directlyOn(realTextView, TextView.class).removeTextChangedListener(watcher);
}
代码示例来源:origin: org.robolectric/shadows-framework
@Implementation
protected void removeTextChangedListener(TextWatcher watcher) {
this.watchers.remove(watcher);
directlyOn(realTextView, TextView.class).removeTextChangedListener(watcher);
}
代码示例来源:origin: org.robolectric/framework
@Implementation
public void removeTextChangedListener(TextWatcher watcher) {
this.watchers.remove(watcher);
directlyOn(realTextView, TextView.class).removeTextChangedListener(watcher);
}
代码示例来源:origin: SmartDengg/sug-debounce
@Override public void unsubscribe() {
if (get() != null) {
TextWatcher textWatcher = getAndSet(null);
LocalHandlerObservable.HANDLER.removeMessages(LocalHandlerObservable.AFTER_TEXT_CHANGE_EVENT);
textView.removeTextChangedListener(textWatcher);
}
}
}
代码示例来源:origin: ssomai/ScalableLayout
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);
}
}
内容来源于网络,如有侵权,请联系作者删除!