implement EditText.setOnEditorActionListener()

This makes the NewPipe search work again
This commit is contained in:
Julian Winkler
2023-11-08 18:00:31 +01:00
parent 1aa1ee64c1
commit bcfb384ba4
6 changed files with 51 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ public class EditText extends TextView {
protected native long native_constructor(Context context, AttributeSet attrs);
protected native String native_getText(long widget);
protected native void native_addTextChangedListener(long widget, TextWatcher watcher);
protected native void native_setOnEditorActionListener(long widget, OnEditorActionListener l);
public Editable getText() {
return new SpannableStringBuilder(native_getText(widget));
@@ -37,4 +38,9 @@ public class EditText extends TextView {
public void addTextChangedListener(TextWatcher watcher) {
native_addTextChangedListener(widget, watcher);
}
@Override
public void setOnEditorActionListener(OnEditorActionListener l) {
native_setOnEditorActionListener(widget, l);
}
}