Loading graphics/java/android/graphics/drawable/InsetDrawable.java +32 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,38 @@ public class InsetDrawable extends Drawable implements Drawable.Callback } } /** * @hide */ @Override public boolean supportsHotspots() { return mInsetState.mDrawable.supportsHotspots(); } /** * @hide */ @Override public void setHotspot(int id, float x, float y) { mInsetState.mDrawable.setHotspot(id, x, y); } /** * @hide */ @Override public void removeHotspot(int id) { mInsetState.mDrawable.removeHotspot(id); } /** * @hide */ @Override public void clearHotspots() { mInsetState.mDrawable.clearHotspots(); } @Override public boolean setVisible(boolean visible, boolean restart) { mInsetState.mDrawable.setVisible(visible, restart); Loading graphics/java/android/graphics/drawable/LayerDrawable.java +52 −0 Original line number Diff line number Diff line Loading @@ -423,6 +423,58 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { } } /** * @hide */ @Override public boolean supportsHotspots() { final ChildDrawable[] array = mLayerState.mChildren; final int N = mLayerState.mNum; for (int i = 0; i < N; i++) { if (array[i].mDrawable.supportsHotspots()) { return true; } } return false; } /** * @hide */ @Override public void setHotspot(int id, float x, float y) { final ChildDrawable[] array = mLayerState.mChildren; final int N = mLayerState.mNum; for (int i = 0; i < N; i++) { array[i].mDrawable.setHotspot(id, x, y); } } /** * @hide */ @Override public void removeHotspot(int id) { final ChildDrawable[] array = mLayerState.mChildren; final int N = mLayerState.mNum; for (int i = 0; i < N; i++) { array[i].mDrawable.removeHotspot(id); } } /** * @hide */ @Override public void clearHotspots() { final ChildDrawable[] array = mLayerState.mChildren; final int N = mLayerState.mNum; for (int i = 0; i < N; i++) { array[i].mDrawable.clearHotspots(); } } private void computeStackedPadding(Rect padding) { padding.left = 0; padding.top = 0; Loading Loading
graphics/java/android/graphics/drawable/InsetDrawable.java +32 −0 Original line number Diff line number Diff line Loading @@ -182,6 +182,38 @@ public class InsetDrawable extends Drawable implements Drawable.Callback } } /** * @hide */ @Override public boolean supportsHotspots() { return mInsetState.mDrawable.supportsHotspots(); } /** * @hide */ @Override public void setHotspot(int id, float x, float y) { mInsetState.mDrawable.setHotspot(id, x, y); } /** * @hide */ @Override public void removeHotspot(int id) { mInsetState.mDrawable.removeHotspot(id); } /** * @hide */ @Override public void clearHotspots() { mInsetState.mDrawable.clearHotspots(); } @Override public boolean setVisible(boolean visible, boolean restart) { mInsetState.mDrawable.setVisible(visible, restart); Loading
graphics/java/android/graphics/drawable/LayerDrawable.java +52 −0 Original line number Diff line number Diff line Loading @@ -423,6 +423,58 @@ public class LayerDrawable extends Drawable implements Drawable.Callback { } } /** * @hide */ @Override public boolean supportsHotspots() { final ChildDrawable[] array = mLayerState.mChildren; final int N = mLayerState.mNum; for (int i = 0; i < N; i++) { if (array[i].mDrawable.supportsHotspots()) { return true; } } return false; } /** * @hide */ @Override public void setHotspot(int id, float x, float y) { final ChildDrawable[] array = mLayerState.mChildren; final int N = mLayerState.mNum; for (int i = 0; i < N; i++) { array[i].mDrawable.setHotspot(id, x, y); } } /** * @hide */ @Override public void removeHotspot(int id) { final ChildDrawable[] array = mLayerState.mChildren; final int N = mLayerState.mNum; for (int i = 0; i < N; i++) { array[i].mDrawable.removeHotspot(id); } } /** * @hide */ @Override public void clearHotspots() { final ChildDrawable[] array = mLayerState.mChildren; final int N = mLayerState.mNum; for (int i = 0; i < N; i++) { array[i].mDrawable.clearHotspots(); } } private void computeStackedPadding(Rect padding) { padding.left = 0; padding.top = 0; Loading