Morphing path data is one of the the most fun ways to animate icons (and other drawables), but sometimes we just need a simple symmetrical motion, such as rotation and translation.
The following example demonstrates how to apply one of these animation types:
- Select a vector drawable of your choice and save its pathData as a string. Here, we have taken the data from the asset studio using the ic_first_page_black_24dp icon:
<string name="first_page"> M18.41,16.59 L13.82,12 l4.59,-4.59 L17,6 l-6,6 6,6 z M6,6 h2 v12 H6 z </string>
- As before, create an XML asset for this; here, we will call ...