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: misc stubs, additions and fixes
This commit is contained in:
@@ -29,7 +29,11 @@ public class ImageView extends View {
|
||||
}
|
||||
|
||||
public ImageView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
this(context, attrs, defStyleAttr, 0);
|
||||
}
|
||||
|
||||
public ImageView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||
super(context, attrs, defStyleAttr, defStyleRes);
|
||||
|
||||
haveCustomMeasure = false;
|
||||
TypedArray a = context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.ImageView, defStyleAttr, 0);
|
||||
@@ -65,7 +69,7 @@ public class ImageView extends View {
|
||||
}
|
||||
|
||||
public void setImageDrawable(Drawable drawable) {
|
||||
if (colorFilter != null) {
|
||||
if (drawable != null && colorFilter != null) {
|
||||
drawable = drawable.mutate();
|
||||
drawable.setColorFilter(colorFilter);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user