Add comment
This commit is contained in:
parent
9b1861417c
commit
8f4c6fb6ac
1 changed files with 2 additions and 0 deletions
|
@ -589,12 +589,14 @@ public class SearchFragment extends BaseListFragment<SearchInfo, ListExtractor.I
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterTextChanged(final Editable s) {
|
public void afterTextChanged(final Editable s) {
|
||||||
|
// Remove rich text formatting
|
||||||
final CharacterStyle[] toBeRemovedSpans = s.getSpans(
|
final CharacterStyle[] toBeRemovedSpans = s.getSpans(
|
||||||
0, s.length(), CharacterStyle.class
|
0, s.length(), CharacterStyle.class
|
||||||
);
|
);
|
||||||
for (final CharacterStyle toBeRemovedSpan : toBeRemovedSpans) {
|
for (final CharacterStyle toBeRemovedSpan : toBeRemovedSpans) {
|
||||||
s.removeSpan(toBeRemovedSpan);
|
s.removeSpan(toBeRemovedSpan);
|
||||||
}
|
}
|
||||||
|
|
||||||
final String newText = searchEditText.getText().toString();
|
final String newText = searchEditText.getText().toString();
|
||||||
suggestionPublisher.onNext(newText);
|
suggestionPublisher.onNext(newText);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue