bodymovin-to-avd icon indicating copy to clipboard operation
bodymovin-to-avd copied to clipboard

Support gradient in AVD

Open wsxyeah opened this issue 5 years ago • 1 comments

Gradient in vector drawable has been supported since API 24, any plan to support that?

An example with gradient inside AVD.

<vector xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:aapt="http://schemas.android.com/aapt"
    android:width="262dp"
    android:height="264dp"
    android:viewportWidth="262"
    android:viewportHeight="264">
  <path
      android:pathData="m44.698,97.984l77.922,0l24.078,-74.102l24.078,74.102l77.922,0l-63.04,45.797l24.08,74.102l-63.04,-45.798l-63.04,45.798l24.08,-74.102l-63.04,-45.797z"
      android:strokeAlpha="null"
      android:strokeWidth="1.5"
      android:strokeColor="#000">
    <aapt:attr name="android:fillColor">
      <gradient 
          android:startY="23.882004"
          android:startX="44.697998"
          android:endY="23.882004"
          android:endX="248.698"
          android:type="linear">
        <item android:offset="0" android:color="#FF00BF5F"/>
        <item android:offset="1" android:color="#FFFF40A0"/>
      </gradient>
    </aapt:attr>
  </path>
</vector>

wsxyeah avatar Jun 20 '19 10:06 wsxyeah

https://www.nangonghan.com/lottie/

use my tools can change Json to xml support gradient

nangonghan avatar Apr 19 '21 03:04 nangonghan