Skip to content

Commit

Permalink
feat: new splash screen.
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyroid committed Nov 17, 2023
1 parent e7ac6ee commit bfb6b75
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 6 deletions.
9 changes: 9 additions & 0 deletions androidApp/src/main/res/anim/bounce.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/bounce_interpolator">

<translate
android:duration="900"
android:fromXDelta="100%p"
android:toXDelta="0%p" />
</set>
43 changes: 43 additions & 0 deletions androidApp/src/main/res/drawable/splash.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<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:name="vector"
android:width="960dp"
android:height="960dp"
android:viewportWidth="960"
android:viewportHeight="960">
<group
android:name="group"
android:pivotX="480"
android:pivotY="480"
android:scaleX="0.85"
android:scaleY="0.85">
<path
android:name="path"
android:pathData="M 320 687 L 320 273 Q 320 256 332 244.5 Q 344 233 360 233 Q 365 233 370.5 234.5 Q 376 236 381 239 L 707 446 Q 716 452 720.5 461 Q 725 470 725 480 Q 725 490 720.5 499 Q 716 508 707 514 L 381 721 Q 376 724 370.5 725.5 Q 365 727 360 727 Q 344 727 332 715.5 Q 320 704 320 687 Z"
android:fillColor="#ffffff"
android:strokeWidth="1"/>
</group>
</vector>
</aapt:attr>
<target android:name="group">
<aapt:attr name="android:animation">
<set>
<objectAnimator
android:propertyName="scaleX"
android:valueFrom="0.4"
android:valueTo="1"
android:valueType="floatType"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"/>
<objectAnimator
android:propertyName="scaleY"
android:valueFrom="0.4"
android:valueTo="1"
android:valueType="floatType"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"/>
</set>
</aapt:attr>
</target>
</animated-vector>
7 changes: 7 additions & 0 deletions androidApp/src/main/res/drawable/splash_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="-45"
android:endColor="#ceb951"
android:startColor="#61b34f" />
</shape>
6 changes: 3 additions & 3 deletions androidApp/src/main/res/values-v27/themes.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.M3U.Starting" parent="Theme.SplashScreen.IconBackground">
<item name="windowSplashScreenBackground">@color/background</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/news_avd_v02</item>
<item name="windowSplashScreenAnimationDuration">200</item>
<item name="windowSplashScreenBackground">#96b650</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splash</item>
<item name="windowSplashScreenAnimationDuration">400</item>
<item name="postSplashScreenTheme">@style/Theme.M3U</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style>
Expand Down
6 changes: 3 additions & 3 deletions androidApp/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<style name="Theme.M3U" parent="android:Theme.Material.Light.NoActionBar">
</style>
<style name="Theme.M3U.Starting" parent="Theme.SplashScreen.IconBackground">
<item name="windowSplashScreenBackground">@color/background</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/news_avd_v02</item>
<item name="windowSplashScreenAnimationDuration">200</item>
<item name="windowSplashScreenBackground">#96b650</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splash</item>
<item name="windowSplashScreenAnimationDuration">400</item>
<item name="postSplashScreenTheme">@style/Theme.M3U</item>
</style>
</resources>

0 comments on commit bfb6b75

Please sign in to comment.