Loading api/current.xml +12 −1 Original line number Original line Diff line number Diff line Loading @@ -220707,6 +220707,17 @@ <parameter name="autoScale" type="boolean"> <parameter name="autoScale" type="boolean"> </parameter> </parameter> </method> </method> <method name="buildLayer" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="cancelLongPress" <method name="cancelLongPress" return="void" return="void" abstract="false" abstract="false" Loading Loading @@ -266669,7 +266680,7 @@ deprecated="not deprecated" deprecated="not deprecated" visibility="public" visibility="public" > > <parameter name="t" type="T"> <parameter name="arg0" type="T"> </parameter> </parameter> </method> </method> </interface> </interface> core/java/android/view/View.java +31 −0 Original line number Original line Diff line number Diff line Loading @@ -8488,6 +8488,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * {@link #LAYER_TYPE_HARDWARE} * {@link #LAYER_TYPE_HARDWARE} * * * @see #setLayerType(int, android.graphics.Paint) * @see #setLayerType(int, android.graphics.Paint) * @see #buildLayer() * @see #LAYER_TYPE_NONE * @see #LAYER_TYPE_NONE * @see #LAYER_TYPE_SOFTWARE * @see #LAYER_TYPE_SOFTWARE * @see #LAYER_TYPE_HARDWARE * @see #LAYER_TYPE_HARDWARE Loading @@ -8496,6 +8497,36 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility return mLayerType; return mLayerType; } } /** * Forces this view's layer to be created and this view to be rendered * into its layer. If this view's layer type is set to {@link #LAYER_TYPE_NONE}, * invoking this method will have no effect. * * This method can for instance be used to render a view into its layer before * starting an animation. If this view is complex, rendering into the layer * before starting the animation will avoid skipping frames. * * @throws IllegalStateException If this view is not attached to a window * * @see #setLayerType(int, android.graphics.Paint) */ public void buildLayer() { if (mLayerType == LAYER_TYPE_NONE) return; if (mAttachInfo == null) { throw new IllegalStateException("This view must be attached to a window first"); } switch (mLayerType) { case LAYER_TYPE_HARDWARE: getHardwareLayer(); break; case LAYER_TYPE_SOFTWARE: buildDrawingCache(true); break; } } /** /** * <p>Returns a hardware layer that can be used to draw this view again * <p>Returns a hardware layer that can be used to draw this view again * without executing its draw method.</p> * without executing its draw method.</p> Loading Loading
api/current.xml +12 −1 Original line number Original line Diff line number Diff line Loading @@ -220707,6 +220707,17 @@ <parameter name="autoScale" type="boolean"> <parameter name="autoScale" type="boolean"> </parameter> </parameter> </method> </method> <method name="buildLayer" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="cancelLongPress" <method name="cancelLongPress" return="void" return="void" abstract="false" abstract="false" Loading Loading @@ -266669,7 +266680,7 @@ deprecated="not deprecated" deprecated="not deprecated" visibility="public" visibility="public" > > <parameter name="t" type="T"> <parameter name="arg0" type="T"> </parameter> </parameter> </method> </method> </interface> </interface>
core/java/android/view/View.java +31 −0 Original line number Original line Diff line number Diff line Loading @@ -8488,6 +8488,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility * {@link #LAYER_TYPE_HARDWARE} * {@link #LAYER_TYPE_HARDWARE} * * * @see #setLayerType(int, android.graphics.Paint) * @see #setLayerType(int, android.graphics.Paint) * @see #buildLayer() * @see #LAYER_TYPE_NONE * @see #LAYER_TYPE_NONE * @see #LAYER_TYPE_SOFTWARE * @see #LAYER_TYPE_SOFTWARE * @see #LAYER_TYPE_HARDWARE * @see #LAYER_TYPE_HARDWARE Loading @@ -8496,6 +8497,36 @@ public class View implements Drawable.Callback, KeyEvent.Callback, Accessibility return mLayerType; return mLayerType; } } /** * Forces this view's layer to be created and this view to be rendered * into its layer. If this view's layer type is set to {@link #LAYER_TYPE_NONE}, * invoking this method will have no effect. * * This method can for instance be used to render a view into its layer before * starting an animation. If this view is complex, rendering into the layer * before starting the animation will avoid skipping frames. * * @throws IllegalStateException If this view is not attached to a window * * @see #setLayerType(int, android.graphics.Paint) */ public void buildLayer() { if (mLayerType == LAYER_TYPE_NONE) return; if (mAttachInfo == null) { throw new IllegalStateException("This view must be attached to a window first"); } switch (mLayerType) { case LAYER_TYPE_HARDWARE: getHardwareLayer(); break; case LAYER_TYPE_SOFTWARE: buildDrawingCache(true); break; } } /** /** * <p>Returns a hardware layer that can be used to draw this view again * <p>Returns a hardware layer that can be used to draw this view again * without executing its draw method.</p> * without executing its draw method.</p> Loading