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
add some methods needed for androidx dialogs
This commit is contained in:
@@ -3,6 +3,7 @@ package android.app;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface.OnCancelListener;
|
||||
import android.content.DialogInterface.OnDismissListener;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.view.Menu;
|
||||
@@ -55,6 +56,7 @@ public class Dialog implements Window.Callback {
|
||||
|
||||
public void show() {
|
||||
System.out.println("totally showing the Dialog " + this + " right now, most definitely doing that");
|
||||
onCreate(null);
|
||||
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -72,7 +74,12 @@ public class Dialog implements Window.Callback {
|
||||
}
|
||||
|
||||
public Window getWindow() {
|
||||
return new Window(this);
|
||||
return new Window(this) {
|
||||
@Override
|
||||
public void setContentView(View view) {
|
||||
Dialog.this.setContentView(view);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public void setCanceledOnTouchOutside(boolean cancel) {}
|
||||
@@ -85,8 +92,6 @@ public class Dialog implements Window.Callback {
|
||||
|
||||
@Override
|
||||
public void onContentChanged() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'onContentChanged'");
|
||||
}
|
||||
@Override
|
||||
public boolean onCreatePanelMenu(int featureId, Menu menu) {
|
||||
@@ -113,4 +118,8 @@ public class Dialog implements Window.Callback {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'onPanelClosed'");
|
||||
}
|
||||
|
||||
protected void onCreate (Bundle savedInstanceState) {
|
||||
System.out.println("- onCreate - Dialog!");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user