You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
android: Support Unity text input dialog
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user