android: Support Unity text input dialog

This commit is contained in:
Nikita Travkin
2024-05-19 12:52:47 +05:00
parent c4af0d1ed4
commit e1f79dc3a9
3 changed files with 26 additions and 0 deletions

View File

@@ -30,6 +30,10 @@ public class Dialog implements Window.Callback, DialogInterface {
window.native_window = nativePtr;
}
public Dialog(Context context) {
this(context, 0);
}
public final boolean requestWindowFeature(int featureId) {
return false;
}
@@ -60,6 +64,10 @@ public class Dialog implements Window.Callback, DialogInterface {
this.onDismissListener = onDismissListener;
}
public View findViewById(int id) {
return window.findViewById(id);
}
public void show() {
System.out.println("showing the Dialog " + this);
Runnable action = new Runnable() {

View File

@@ -101,4 +101,9 @@ public class Window {
public void setFormat(int format) {}
public void setLayout(int dummy, int dummy2) {}
public WindowManager getWindowManager() {
return new WindowManagerImpl();
}
}

View File

@@ -126,9 +126,20 @@ public class TextView extends View {
}
public void setHintTextColor(ColorStateList colorStateList) {}
public void setHintTextColor(int i) {}
public void setLinkTextColor(ColorStateList colorStateList) {}
public void setSingleLine() {}
public void setSelection(int i) {}
public void setSelection(int i, int j) {}
public int getSelectionStart() {
return 0;
}
public int getSelectionEnd() {
return 0;
}
public void setEllipsize(TextUtils.TruncateAt truncateAt) {}
@@ -245,4 +256,6 @@ public class TextView extends View {
public void setCompoundDrawablesWithIntrinsicBounds(int left, int top, int right, int bottom) {}
public void setCompoundDrawablesWithIntrinsicBounds(Drawable left, Drawable top, Drawable right, Drawable bottom) {}
public void setHint(CharSequence s) {}
}