mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Migrate to Android 12 splash screen implementation
This commit is contained in:
parent
a531502a1b
commit
43c78c6e9b
8 changed files with 37 additions and 1 deletions
1
.idea/.name
generated
Normal file
1
.idea/.name
generated
Normal file
|
|
@ -0,0 +1 @@
|
|||
Play
|
||||
17
.idea/deploymentTargetDropDown.xml
generated
Normal file
17
.idea/deploymentTargetDropDown.xml
generated
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<targetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="QUICK_BOOT_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="VIRTUAL_DEVICE_PATH" />
|
||||
<value value="$USER_HOME$/.android/avd/Pixel_3a_API_30_x86.avd" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2021-08-04T06:28:38.102773Z" />
|
||||
</component>
|
||||
</project>
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
|
|
@ -3,8 +3,10 @@
|
|||
<component name="DesignSurface">
|
||||
<option name="filePathToZoomLevelMap">
|
||||
<map>
|
||||
<entry key="app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.2814814814814815" />
|
||||
<entry key="app/src/main/res/drawable/ic_downloading.xml" value="0.2722222222222222" />
|
||||
<entry key="app/src/main/res/drawable/ic_file_download.xml" value="0.2722222222222222" />
|
||||
<entry key="app/src/main/res/drawable/ic_launcher_background.xml" value="0.2814814814814815" />
|
||||
<entry key="app/src/main/res/drawable/ic_refresh.xml" value="0.18958333333333333" />
|
||||
<entry key="app/src/main/res/drawable/ic_shuffle.xml" value="0.2722222222222222" />
|
||||
<entry key="app/src/main/res/drawable/ic_star.xml" value="0.2722222222222222" />
|
||||
|
|
|
|||
|
|
@ -52,6 +52,9 @@ dependencies {
|
|||
// Android Material
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
|
||||
// Splashscreen
|
||||
implementation 'androidx.core:core-splashscreen:1.0.0-alpha01'
|
||||
|
||||
// VolleyRequest
|
||||
implementation 'com.android.volley:volley:1.2.0'
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:theme="@style/Theme.App.Starting"
|
||||
android:usesCleartextTraffic="true">
|
||||
<activity
|
||||
android:name=".ui.activity.MainActivity"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ 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;
|
||||
|
|
@ -44,6 +45,8 @@ 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);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
<?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>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
<?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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue