Type Reason Java.Lang.IllegalStateException If this view is not attached to a window
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 View.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.