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: add stubs / simple stuff for OsmAnd
without native libs present, launches and renders white square in map view; with native libs present, segfaults in bundled skia
This commit is contained in:
@@ -867,16 +867,18 @@ public class View implements Drawable.Callback {
|
||||
TypedArray a = context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.View, defStyle, 0);
|
||||
this.id = a.getResourceId(com.android.internal.R.styleable.View_id, View.NO_ID);
|
||||
if (a.hasValue(com.android.internal.R.styleable.View_background)) {
|
||||
Drawable background = a.getDrawable(com.android.internal.R.styleable.View_background);
|
||||
try {
|
||||
Drawable background = a.getDrawable(com.android.internal.R.styleable.View_background);
|
||||
|
||||
if(background != null) {
|
||||
if(background instanceof ColorDrawable) {
|
||||
System.out.printf("__background__: >%x<\n", ((ColorDrawable)background).getColor());
|
||||
setBackgroundColor(((ColorDrawable)background).getColor());
|
||||
} else {
|
||||
setBackgroundDrawable(background);
|
||||
if(background != null) {
|
||||
if(background instanceof ColorDrawable) {
|
||||
System.out.printf("__background__: >%x<\n", ((ColorDrawable)background).getColor());
|
||||
setBackgroundColor(((ColorDrawable)background).getColor());
|
||||
} else {
|
||||
setBackgroundDrawable(background);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) { e.printStackTrace(); }
|
||||
}
|
||||
if (a.hasValue(com.android.internal.R.styleable.View_visibility)) {
|
||||
setVisibility(VISIBILITY_FLAGS[a.getInt(com.android.internal.R.styleable.View_visibility, 0)]);
|
||||
@@ -1714,4 +1716,10 @@ public class View implements Drawable.Callback {
|
||||
public void requestFitSystemWindows() {}
|
||||
|
||||
public boolean isPressed() {return false;}
|
||||
|
||||
public void getWindowVisibleDisplayFrame(Rect rect) {}
|
||||
|
||||
public void setRotationX(float deg) {}
|
||||
|
||||
public void setRotationY(float deg) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user