add bunch of new java APIs: mostly stubs or copied from AOSP

Many of these classes are only needed to be subclassed by androidx
support library, which is used in many android apps
This commit is contained in:
Julian Winkler
2023-08-17 10:46:24 +02:00
parent a8e39cd613
commit 82744e9e5e
87 changed files with 2746 additions and 46 deletions

View File

@@ -16,9 +16,11 @@ public class ImageView extends View {
super(context, attrs);
native_constructor(attrs);
int resource = attrs.getAttributeResourceValue("http://schemas.android.com/apk/res/android", "src", 0);
if (resource != 0)
setImageResource(resource);
if (attrs != null) {
int resource = attrs.getAttributeResourceValue("http://schemas.android.com/apk/res/android", "src", 0);
if (resource != 0)
setImageResource(resource);
}
}
public ImageView(Context context) {
@@ -51,6 +53,8 @@ public class ImageView extends View {
return new BitmapDrawable(getContext().getResources(), bitmap);
}
public void setImageDrawable(Drawable drawable) {}
/**
* Options for scaling the bounds of an image to the bounds of this view.
*/