Android SVG with Gradient on API +17

ساخت وبلاگ

Vote count: 0

I decide to create my own splash screen for my android applications, i want to draw path and fill my brand logo as a SVG with Animation, so i searched about android SVG libraries and then find this :

https://github.com/jaredrummler/AnimatedSvgView

this library has a good performance on solid colors: Screen shot from emulator

Question:

My logo has gradient patte and this library and other libraries i've searched before doesn't support gradient.

i created a xml gradient into drawable : radial_gradient.xml

<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:type="radial" android:startColor="#34364E" android:endColor="#0C0824" android:gradientRadius="100" android:angle="270" android:centerX="-183.6897" android:centerY="328.9722"/>
</shape>

and use it to one of color array items :

<integer-array name="svg_path_colors"> <item>@drawable/radial_gradient</item> <item>@color/google_red</item> <item>@color/google_yellow</item> <item>@color/google_blue</item>
</integer-array>

this trick doesn't work for me

please show me a good way for animate my SVG with gradient fill , firt draw SVG path then fill SVG gradient background. THANKS

asked 40 secs ago

- - , .
.

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : نویسنده : استخدام کار backsoft بازدید : 290 تاريخ : پنجشنبه 24 تير 1395 ساعت: 15:20