本文整理了Java中android.text.TextWatcher.afterTextChanged()
方法的一些代码示例,展示了TextWatcher.afterTextChanged()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextWatcher.afterTextChanged()
方法的具体详情如下:
包路径:android.text.TextWatcher
类名称:TextWatcher
方法名:afterTextChanged
暂无
代码示例来源:origin: facebook/litho
@Override
public void afterTextChanged(Editable editable) {
for (TextWatcher w : mTextWatchers) {
w.afterTextChanged(editable);
}
}
}
代码示例来源:origin: facebook/litho
@Override
public void afterTextChanged(Editable s) {
if (mDelegates != null) {
for (int i = 0, stop = mDelegates.size(); i < stop; i++) {
mDelegates.get(i).afterTextChanged(s);
}
}
if (mTextChangedEventHandler != null) {
com.facebook.litho.widget.EditText.dispatchTextChangedEvent(
mTextChangedEventHandler, EditTextWithEventHandlers.this, s.toString());
}
}
}
代码示例来源:origin: sunhapper/SpEditTool
@Override
public void afterTextChanged(Editable s) {
((TextWatcher) mObject).afterTextChanged(s);
}
代码示例来源:origin: sharish/WhatsappFormatter
private static void sendAfterTextChanged(TextWatcher[] mListeners, Editable s) {
if (mListeners != null) {
for (int i = 0; i < mListeners.length; i++) {
mListeners[i].afterTextChanged(s);
}
}
}
代码示例来源:origin: morogoku/MTweaks-KernelAdiutorMOD
@Override
public void afterTextChanged(Editable s) {
if (mTextWatcher != null) {
mTextWatcher.afterTextChanged(s);
}
mText = s;
}
});
代码示例来源:origin: hylinux1024/Componentization
@Override
public void afterTextChanged(Editable s) {
if (mTextWatcher != null) {
mTextWatcher.afterTextChanged(s);
}
}
}
代码示例来源:origin: sharish/WhatsappFormatter
/**
* Send an after text change event to child listeners
* @see {@link TextWatcher#afterTextChanged(Editable)}
*/
private void sendAfterTextChanged(Editable s) {
if (mListeners != null) {
for (int i = 0; i < mListeners.size(); i++) {
mListeners.get(i).afterTextChanged(s);
}
}
}
代码示例来源:origin: dkzwm/FormatEditText
private void sendAfterTextChanged(Editable s) {
if (mWatchers != null) {
final List<TextWatcher> list = mWatchers;
final int size = list.size();
for (int i = 0; i < size; i++) {
list.get(i).afterTextChanged(s);
}
}
}
代码示例来源:origin: yydcdut/RxMarkdown
private void sendAfterTextChanged(Editable s) {
if (mListeners != null) {
final ArrayList<TextWatcher> list = mListeners;
final int count = list.size();
for (int i = 0; i < count; i++) {
list.get(i).afterTextChanged(s);
}
}
}
代码示例来源:origin: sharish/WhatsappFormatter
/**
* Send an after text change event to child listeners
*
* @see {@link TextWatcher#afterTextChanged(Editable)}
*/
private void sendAfterTextChanged(Editable s) {
if (mListeners != null) {
for (int i = 0; i < mListeners.size(); i++) {
mListeners.get(i).afterTextChanged(s);
}
}
}
代码示例来源:origin: linkedin/Spyglass
/**
* Notify external text watchers that the text has changed.
* See {@link TextWatcher#afterTextChanged(Editable)}.
*/
private void sendAfterTextChanged(Editable text) {
final List<TextWatcher> list = mExternalTextWatchers;
final int count = list.size();
for (int i = 0; i < count; i++) {
TextWatcher watcher = list.get(i);
if (watcher != this) {
watcher.afterTextChanged(text);
}
}
}
代码示例来源:origin: com.github.japgolly.android.test/robolectric
private void sendAfterTextChanged() {
for (TextWatcher watcher : watchers) {
watcher.afterTextChanged(new SpannableStringBuilder(getText()));
}
}
代码示例来源:origin: adolfAn/FBReader_AS
@Override
protected void showDialog(Bundle state) {
super.showDialog(state);
myEditor.removeTextChangedListener(myWatcher);
myEditor.addTextChangedListener(myWatcher);
myWatcher.afterTextChanged(null);
}
代码示例来源:origin: ydcx/KooReader
@Override
protected void showDialog(Bundle state) {
super.showDialog(state);
myEditor.removeTextChangedListener(myWatcher);
myEditor.addTextChangedListener(myWatcher);
myWatcher.afterTextChanged(null);
}
代码示例来源:origin: Jiangzqts/EpubRead
@Override
protected void showDialog(Bundle state) {
super.showDialog(state);
myEditor.removeTextChangedListener(myWatcher);
myEditor.addTextChangedListener(myWatcher);
myWatcher.afterTextChanged(null);
}
代码示例来源:origin: mabbas007/TagsEditText
@Override
public void onGlobalLayout() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
getViewTreeObserver().removeOnGlobalLayoutListener(this);
} else {
getViewTreeObserver().removeGlobalOnLayoutListener(this);
}
addTextChangedListener(mTextWatcher);
mTextWatcher.afterTextChanged(getText());
}
});
代码示例来源:origin: mabbas007/TagsEditText
/**
* use this method to set tags
*/
public void setTags(CharSequence... tags) {
mTagSpans.clear();
mTags.clear();
int length = tags != null ? tags.length : 0;
int position = 0;
for (int i = 0; i < length; i++) {
Tag tag = new Tag();
tag.setIndex(i);
tag.setPosition(position);
String source = mIsSpacesAllowedInTags ? tags[i].toString().trim() : tags[i].toString().replaceAll(" ", "");
tag.setSource(source);
tag.setSpan(true);
mTags.add(tag);
position += source.length() + 1;
}
buildStringWithTags(mTags);
mTextWatcher.afterTextChanged(getText());
}
代码示例来源:origin: mabbas007/TagsEditText
/**
* use this method to set tags
*/
public void setTags(String[] tags) {
mTagSpans.clear();
mTags.clear();
int length = tags != null ? tags.length : 0;
int position = 0;
for (int i = 0; i < length; i++) {
Tag tag = new Tag();
tag.setIndex(i);
tag.setPosition(position);
String source = mIsSpacesAllowedInTags ? tags[i].trim() : tags[i].replaceAll(" ", "");
tag.setSource(source);
tag.setSpan(true);
mTags.add(tag);
position += source.length() + 1;
}
buildStringWithTags(mTags);
mTextWatcher.afterTextChanged(getText());
}
代码示例来源:origin: mabbas007/TagsEditText
Collections.addAll(mTags, tags);
buildStringWithTags(mTags);
mTextWatcher.afterTextChanged(getText());
代码示例来源:origin: mabbas007/TagsEditText
mTextWatcher.afterTextChanged(getText());
} else {
super.setText(text, type);
内容来源于网络,如有侵权,请联系作者删除!