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
api-impl,libandroid: Add some stubs, mostly
This commit is contained in:
@@ -14,6 +14,10 @@ public class AlertDialog extends Dialog implements DialogInterface {
|
||||
super(context, 0);
|
||||
}
|
||||
|
||||
public AlertDialog(Context context, int themeResId) {
|
||||
super(context, themeResId);
|
||||
}
|
||||
|
||||
public void setMessage(CharSequence message) {
|
||||
System.out.println("AlertDialog setMessage called with: '" + message + "'");
|
||||
nativeSetMessage(nativePtr, String.valueOf(message));
|
||||
@@ -41,6 +45,12 @@ public class AlertDialog extends Dialog implements DialogInterface {
|
||||
return this;
|
||||
}
|
||||
|
||||
public AlertDialog.Builder setNegativeButton (CharSequence text, DialogInterface.OnClickListener listener) {
|
||||
System.out.println("AlertDialog.Builder setNegativeButton called with text: '" + text + "'");
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public AlertDialog.Builder setCancelable(boolean cancelable) {
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,10 @@ public class Dialog {
|
||||
nativeSetTitle(nativePtr, String.valueOf(title));
|
||||
}
|
||||
|
||||
public void setTitle(int titleId) {
|
||||
nativeSetTitle(nativePtr, context.getString(titleId));
|
||||
}
|
||||
|
||||
public void setOwnerActivity(Activity activity) {}
|
||||
|
||||
public void setCancelable(boolean cancelable) {}
|
||||
|
||||
@@ -2,9 +2,15 @@ package android.app;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
public class ProgressDialog extends Dialog {
|
||||
public class ProgressDialog extends AlertDialog {
|
||||
|
||||
public ProgressDialog(Context context) {
|
||||
super(context, 0);
|
||||
}
|
||||
|
||||
public ProgressDialog(Context context, int themeResId) {
|
||||
super(context, themeResId);
|
||||
}
|
||||
|
||||
public void setIndeterminate(boolean indeterminate) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user