api-impl,libandroid: Add some stubs, mostly

This commit is contained in:
Nikita Travkin
2023-09-19 17:37:14 +05:00
committed by Mis012
parent a32961891d
commit d3e5c6ee70
8 changed files with 102 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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) {}

View File

@@ -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) {}
}