Loading tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java +0 −23 Original line number Diff line number Diff line Loading @@ -863,29 +863,6 @@ public class VectorDrawable_Delegate { } mLocalMatrix.set(copy.mLocalMatrix); final ArrayList<Object> children = copy.mChildren; //noinspection ForLoopReplaceableByForEach for (int i = 0; i < children.size(); i++) { Object copyChild = children.get(i); if (copyChild instanceof VGroup_Delegate) { VGroup_Delegate copyGroup = (VGroup_Delegate) copyChild; mChildren.add(new VGroup_Delegate(copyGroup, targetsMap)); } else { VPath_Delegate newPath; if (copyChild instanceof VFullPath_Delegate) { newPath = new VFullPath_Delegate((VFullPath_Delegate) copyChild); } else if (copyChild instanceof VClipPath_Delegate) { newPath = new VClipPath_Delegate((VClipPath_Delegate) copyChild); } else { throw new IllegalStateException("Unknown object in the tree!"); } mChildren.add(newPath); if (newPath.mPathName != null) { targetsMap.put(newPath.mPathName, newPath); } } } } private VGroup_Delegate() { Loading tools/layoutlib/bridge/src/android/view/BridgeInflater.java +12 −0 Original line number Diff line number Diff line Loading @@ -38,7 +38,10 @@ import org.xmlpull.v1.XmlPullParser; import android.annotation.NonNull; import android.content.Context; import android.content.res.TypedArray; import android.graphics.drawable.Animatable; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.widget.ImageView; import android.widget.NumberPicker; import java.io.File; Loading Loading @@ -401,6 +404,15 @@ public final class BridgeInflater extends LayoutInflater { numberPicker.setMaxValue(Integer.parseInt(maxValue)); } } else if (view instanceof ImageView) { ImageView img = (ImageView) view; Drawable drawable = img.getDrawable(); if (drawable instanceof Animatable) { if (!((Animatable) drawable).isRunning()) { ((Animatable) drawable).start(); } } } } } Loading tools/layoutlib/bridge/src/android/view/Choreographer_Delegate.java +3 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.view; import com.android.ide.common.rendering.api.LayoutLog; import com.android.layoutlib.bridge.Bridge; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; import com.android.tools.layoutlib.java.System_Delegate; import java.lang.reflect.Field; import java.util.concurrent.atomic.AtomicReference; Loading Loading @@ -54,8 +55,8 @@ public class Choreographer_Delegate { public static void doFrame(long frameTimeNanos) { Choreographer thisChoreographer = Choreographer.getInstance(); thisChoreographer.mLastFrameTimeNanos = frameTimeNanos; thisChoreographer.mLastFrameTimeNanos = frameTimeNanos - thisChoreographer .getFrameIntervalNanos(); thisChoreographer.mFrameInfo.markInputHandlingStart(); thisChoreographer.doCallbacks(Choreographer.CALLBACK_INPUT, frameTimeNanos); Loading Loading
tools/layoutlib/bridge/src/android/graphics/drawable/VectorDrawable_Delegate.java +0 −23 Original line number Diff line number Diff line Loading @@ -863,29 +863,6 @@ public class VectorDrawable_Delegate { } mLocalMatrix.set(copy.mLocalMatrix); final ArrayList<Object> children = copy.mChildren; //noinspection ForLoopReplaceableByForEach for (int i = 0; i < children.size(); i++) { Object copyChild = children.get(i); if (copyChild instanceof VGroup_Delegate) { VGroup_Delegate copyGroup = (VGroup_Delegate) copyChild; mChildren.add(new VGroup_Delegate(copyGroup, targetsMap)); } else { VPath_Delegate newPath; if (copyChild instanceof VFullPath_Delegate) { newPath = new VFullPath_Delegate((VFullPath_Delegate) copyChild); } else if (copyChild instanceof VClipPath_Delegate) { newPath = new VClipPath_Delegate((VClipPath_Delegate) copyChild); } else { throw new IllegalStateException("Unknown object in the tree!"); } mChildren.add(newPath); if (newPath.mPathName != null) { targetsMap.put(newPath.mPathName, newPath); } } } } private VGroup_Delegate() { Loading
tools/layoutlib/bridge/src/android/view/BridgeInflater.java +12 −0 Original line number Diff line number Diff line Loading @@ -38,7 +38,10 @@ import org.xmlpull.v1.XmlPullParser; import android.annotation.NonNull; import android.content.Context; import android.content.res.TypedArray; import android.graphics.drawable.Animatable; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.widget.ImageView; import android.widget.NumberPicker; import java.io.File; Loading Loading @@ -401,6 +404,15 @@ public final class BridgeInflater extends LayoutInflater { numberPicker.setMaxValue(Integer.parseInt(maxValue)); } } else if (view instanceof ImageView) { ImageView img = (ImageView) view; Drawable drawable = img.getDrawable(); if (drawable instanceof Animatable) { if (!((Animatable) drawable).isRunning()) { ((Animatable) drawable).start(); } } } } } Loading
tools/layoutlib/bridge/src/android/view/Choreographer_Delegate.java +3 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package android.view; import com.android.ide.common.rendering.api.LayoutLog; import com.android.layoutlib.bridge.Bridge; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; import com.android.tools.layoutlib.java.System_Delegate; import java.lang.reflect.Field; import java.util.concurrent.atomic.AtomicReference; Loading Loading @@ -54,8 +55,8 @@ public class Choreographer_Delegate { public static void doFrame(long frameTimeNanos) { Choreographer thisChoreographer = Choreographer.getInstance(); thisChoreographer.mLastFrameTimeNanos = frameTimeNanos; thisChoreographer.mLastFrameTimeNanos = frameTimeNanos - thisChoreographer .getFrameIntervalNanos(); thisChoreographer.mFrameInfo.markInputHandlingStart(); thisChoreographer.doCallbacks(Choreographer.CALLBACK_INPUT, frameTimeNanos); Loading