Loading core/java/android/widget/ImageView.java +10 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.widget; import android.annotation.DrawableRes; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.TestApi; import android.content.ContentResolver; import android.content.Context; import android.content.res.ColorStateList; Loading Loading @@ -1640,4 +1641,13 @@ public class ImageView extends View { super.encodeProperties(stream); stream.addProperty("layout:baseline", getBaseline()); } /** @hide */ @Override @TestApi public boolean isDefaultFocusHighlightNeeded(Drawable background, Drawable foreground) { final boolean lackFocusState = mDrawable == null || !mDrawable.isStateful() || !mDrawable.hasFocusStateSpecified(); return super.isDefaultFocusHighlightNeeded(background, foreground) && lackFocusState; } } Loading
core/java/android/widget/ImageView.java +10 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.widget; import android.annotation.DrawableRes; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.TestApi; import android.content.ContentResolver; import android.content.Context; import android.content.res.ColorStateList; Loading Loading @@ -1640,4 +1641,13 @@ public class ImageView extends View { super.encodeProperties(stream); stream.addProperty("layout:baseline", getBaseline()); } /** @hide */ @Override @TestApi public boolean isDefaultFocusHighlightNeeded(Drawable background, Drawable foreground) { final boolean lackFocusState = mDrawable == null || !mDrawable.isStateful() || !mDrawable.hasFocusStateSpecified(); return super.isDefaultFocusHighlightNeeded(background, foreground) && lackFocusState; } }