Skip to content

Commit

Permalink
chore: use a scaled drawable for splash screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Yash-Garg committed Dec 14, 2022
1 parent 3ce2923 commit 21e41af
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_key.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="12dp"
android:height="12dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?android:attr/colorAccent">
<path
android:fillColor="@android:color/white"
android:pathData="M12.65,10C11.83,7.67 9.61,6 7,6c-3.31,0 -6,2.69 -6,6s2.69,6 6,6c2.61,0 4.83,-1.67 5.65,-4H17v4h4v-4h2v-4H12.65zM7,14c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2z"/>
</vector>
7 changes: 7 additions & 0 deletions app/src/main/res/drawable/key_inset.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/ic_key"
android:insetLeft="30dp"
android:insetRight="30dp"
android:insetTop="30dp"
android:insetBottom="30dp"/>
4 changes: 2 additions & 2 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<resources>

<style name="Theme.KeyManager.SplashScreen" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">?android:attr/colorAccent</item>
<item name="windowSplashScreenBackground">?android:attr/colorPrimary</item>
<item name="android:windowLightStatusBar">?android:isLightTheme</item>
<item name="windowSplashScreenAnimatedIcon">@mipmap/ic_launcher_foreground</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/key_inset</item>
<item name="windowSplashScreenAnimationDuration">1000</item>
<item name="postSplashScreenTheme">@style/Theme.KeyManager</item>
</style>
Expand Down

0 comments on commit 21e41af

Please sign in to comment.