Removal of the splash screen because it causes some crashes when rotating the device

This commit is contained in:
CappielloAntonio 2021-08-30 09:03:52 +02:00
parent a2243e079f
commit 1c23e53ed7
6 changed files with 3 additions and 18 deletions

View file

@ -51,7 +51,7 @@ dependencies {
implementation 'com.google.android.material:material:1.4.0'
// Splashscreen
implementation 'androidx.core:core-splashscreen:1.0.0-alpha01'
// implementation 'androidx.core:core-splashscreen:1.0.0-alpha01'
// SearchBar
implementation "com.paulrybitskyi.persistentsearchview:persistentsearchview:1.1.3"

View file

@ -12,7 +12,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/Theme.App.Starting"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
android:allowBackup="false">
<activity

View file

@ -6,7 +6,6 @@ import android.os.Bundle;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.core.splashscreen.SplashScreen;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.ViewModelProvider;
import androidx.navigation.NavController;
@ -47,8 +46,6 @@ public class MainActivity extends BaseActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SplashScreen.installSplashScreen(this);
bind = ActivityMainBinding.inflate(getLayoutInflater());
View view = bind.getRoot();
setContentView(view);

View file

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.App.Starting" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/colorPrimary</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher_foreground</item>
<item name="postSplashScreenTheme">@style/AppTheme</item>
</style>
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>

View file

@ -1,11 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.App.Starting" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/colorPrimary</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher_foreground</item>
<item name="postSplashScreenTheme">@style/AppTheme</item>
</style>
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>

View file

@ -7,7 +7,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files