==============
SVG Animations
==============
Initialize
==========
Animations are usually started before *DOMContentLoaded* has been fired and :func:`parseDocument` may be unable to read the initial **attribute** values. Inline hints can be used to recreate the non-*CSS* initial values when they are altered by the native *SVG*.
.. code-block:: html
:caption: JSON
:emphasize-lines: 2
.. code-block:: html
:caption: Delimited
:emphasize-lines: 1-2
Play
====
Only the XML based layout and resource files can be viewed on the Android device/emulator without any Java/Kotlin backend code. To play animations in the emulator you also have to :target:`start` the animation in *MainActivity.java*.
.. code-block:: java
:emphasize-lines: 6
import android.graphics.drawable.Animatable;
android.widget.ImageView svg = findViewById(R.id.imageview_1);
if (svg != null) {
Animatable animatable = (Animatable)svg.getDrawable();
animatable.start();
}