info: add animated icon
Add an animated icon for the splash screen. This is only possible due to the new stroke-based icon, and is just nice eye candy without any downsides.
This commit is contained in:
parent
7a055680bd
commit
1571e513b1
5 changed files with 83 additions and 5 deletions
|
|
@ -4,8 +4,11 @@
|
|||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="@color/fill_icon_bg"
|
||||
android:pathData="M0 0h108v108H0z"
|
||||
android:strokeColor="#00000000" />
|
||||
<group
|
||||
android:name="bg">
|
||||
<path
|
||||
android:fillColor="@color/fill_icon_bg"
|
||||
android:pathData="M0 0h108v108H0z"
|
||||
android:strokeColor="#00000000" />
|
||||
</group>
|
||||
</vector>
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
android:translateX="19.98"
|
||||
android:translateY="19.98">
|
||||
<path
|
||||
android:name="note"
|
||||
android:fillColor="@android:color/transparent"
|
||||
android:pathData="M 13,4.0000207 17,8 M 12.999969,4.0004121 V 17.000315 m 0,-2.94e-4 -3.0000004,3 -2.9999997,-3 2.9999997,-3 M 7.021336,16.939069"
|
||||
android:strokeWidth="2"
|
||||
|
|
|
|||
67
app/src/main/res/drawable/ic_splash_anim.xml
Normal file
67
app/src/main/res/drawable/ic_splash_anim.xml
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt">
|
||||
<aapt:attr name="android:drawable">
|
||||
<vector
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<group android:name="bg">
|
||||
<path
|
||||
android:fillColor="@color/fill_icon_bg"
|
||||
android:pathData="M0 0h108v108H0z"
|
||||
android:strokeColor="#00000000" />
|
||||
</group>
|
||||
<group
|
||||
android:scaleX="2.835"
|
||||
android:scaleY="2.835"
|
||||
android:translateX="19.98"
|
||||
android:translateY="19.98">
|
||||
<path
|
||||
android:name="note"
|
||||
android:fillColor="@android:color/transparent"
|
||||
android:pathData="M 13,4.0000207 17,8 M 12.999969,4.0004121 V 17.000315 m 0,-2.94e-4 -3.0000004,3 -2.9999997,-3 2.9999997,-3 M 7.021336,16.939069"
|
||||
android:strokeWidth="2"
|
||||
android:strokeColor="@android:color/white"
|
||||
android:strokeLineCap="round"
|
||||
android:strokeLineJoin="round" />
|
||||
</group>
|
||||
</vector>
|
||||
</aapt:attr>
|
||||
<target android:name="bg">
|
||||
<aapt:attr name="android:animation">
|
||||
<set>
|
||||
<objectAnimator
|
||||
android:duration="1000"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"
|
||||
android:propertyName="scaleX"
|
||||
android:startOffset="0"
|
||||
android:valueFrom="4"
|
||||
android:valueTo="1"
|
||||
android:valueType="floatType" />
|
||||
<objectAnimator
|
||||
android:duration="1000"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"
|
||||
android:propertyName="scaleY"
|
||||
android:startOffset="0"
|
||||
android:valueFrom="4"
|
||||
android:valueTo="1"
|
||||
android:valueType="floatType" />
|
||||
</set>
|
||||
</aapt:attr>
|
||||
</target>
|
||||
<target android:name="note">
|
||||
<aapt:attr name="android:animation">
|
||||
<set>
|
||||
<objectAnimator
|
||||
android:duration="1000"
|
||||
android:interpolator="@android:interpolator/fast_out_slow_in"
|
||||
android:propertyName="strokeWidth"
|
||||
android:startOffset="0"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="2"
|
||||
android:valueType="floatType" />
|
||||
</set>
|
||||
</aapt:attr>
|
||||
</target>
|
||||
</animated-vector>
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Theme.Auxio.V31" parent="Theme.Auxio.V29">
|
||||
<item name="android:windowSplashScreenAnimatedIcon">@drawable/ic_splash_anim</item>
|
||||
</style>
|
||||
|
||||
<!-- Use dynamic colors since that's assumed to be the setting used. -->
|
||||
<style name="Theme.Auxio.App" parent="Theme.Auxio.Base" />
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,12 @@
|
|||
</style>
|
||||
<!-- Adds fully transparent system bars -->
|
||||
<style name="Theme.Auxio.V29" parent="Theme.Auxio.V27" />
|
||||
<!-- Adds an animated splash screen. -->
|
||||
<style name="Theme.Auxio.V31" parent="Theme.Auxio.V29" />
|
||||
|
||||
<!-- Base theme -->
|
||||
<style name="Theme.Auxio.Base" parent="Theme.Auxio.V29">
|
||||
<style name="Theme.Auxio.Base" parent="Theme.Auxio.V31">
|
||||
|
||||
<!-- Material configuration -->
|
||||
<item name="colorOutline">@color/overlay_stroke</item>
|
||||
<item name="toolbarStyle">@style/Widget.Auxio.Toolbar</item>
|
||||
|
|
|
|||
Loading…
Reference in a new issue