mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-22 11:02:35 +01:00
parent
8080c32b1f
commit
9b1861417c
@ -9,6 +9,7 @@ import android.text.Editable;
|
||||
import android.text.Html;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.text.style.CharacterStyle;
|
||||
import android.util.Log;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
@ -588,6 +589,12 @@ public class SearchFragment extends BaseListFragment<SearchInfo, ListExtractor.I
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(final Editable s) {
|
||||
final CharacterStyle[] toBeRemovedSpans = s.getSpans(
|
||||
0, s.length(), CharacterStyle.class
|
||||
);
|
||||
for (final CharacterStyle toBeRemovedSpan : toBeRemovedSpans) {
|
||||
s.removeSpan(toBeRemovedSpan);
|
||||
}
|
||||
final String newText = searchEditText.getText().toString();
|
||||
suggestionPublisher.onNext(newText);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user