Create splash screen

This commit is contained in:
Sylvia van Os
2021-08-12 23:36:55 +02:00
parent 8d82a4616f
commit 67c58c10b2
5 changed files with 14 additions and 2 deletions

View File

@@ -5,6 +5,7 @@
Changes:
- Fix widget creating different-looking shortcut than app shortcuts
- Replace default Android black screen with splash screen
## v2.2.2 (2021-08-08)

View File

@@ -29,7 +29,7 @@
<activity
android:name="protect.card_locker.MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

View File

@@ -177,6 +177,7 @@ public class MainActivity extends AppCompatActivity implements LoyaltyCardCursor
@Override
protected void onCreate(Bundle inputSavedInstanceState)
{
setTheme(R.style.AppTheme_NoActionBar);
super.onCreate(inputSavedInstanceState);
setContentView(R.layout.main_activity);
Toolbar toolbar = findViewById(R.id.toolbar);

View File

@@ -0,0 +1,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/ic_launcher_background"/>
<item android:gravity="center"
android:width="256dp"
android:height="256dp"
android:drawable="@drawable/ic_launcher_foreground" />
</layer-list>

View File

@@ -1,5 +1,4 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Customize your theme here. -->
@@ -17,6 +16,10 @@
<item name="windowNoTitle">true</item>
</style>
<style name="SplashTheme" parent="@style/AppTheme">
<item name="android:windowBackground">@drawable/background_splash</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar"/>
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.MaterialComponents.Light"/>