Browse Source

update libraries & targetSdk; use core-splashscreen for splashscreen

* targetSdk 30 -> 31
* core-ktx 1.6.0 -> 1.7.0
* appcompat 1.3.1 -> 1.4.1
* constraintlayout 2.1.0 -> 2.1.3
* navigation-fragment-ktx 2.3.5 -> 2.4.1
* navigation-ui-ktx 2.3.5 -> 2.4.1
* lifecycle-runtime-ktx 2.3.5 -> 2.4.1
* lifecycle-viewmodel-ktx 2.3.5 -> 2.4.1
* material 1.4.0 -> 1.5.0
pull/54/head
Jannik 3 months ago
parent
commit
cd4cfb7a0c
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
  1. 21
      app/build.gradle
  2. 22
      app/src/main/AndroidManifest.xml
  3. 18
      app/src/main/java/org/mosad/teapod/ui/activity/SplashActivity.kt
  4. 4
      app/src/main/java/org/mosad/teapod/ui/activity/main/MainActivity.kt
  5. 12
      app/src/main/res/drawable/bg_splash.xml
  6. 19
      app/src/main/res/drawable/ic_splash_foreground.xml
  7. BIN
      app/src/main/res/drawable/ic_splash_logo.png
  8. 5
      app/src/main/res/mipmap-anydpi-v26/ic_splash_round.xml
  9. BIN
      app/src/main/res/mipmap-hdpi/ic_splash_round.png
  10. BIN
      app/src/main/res/mipmap-mdpi/ic_splash_round.png
  11. BIN
      app/src/main/res/mipmap-xhdpi/ic_splash_round.png
  12. BIN
      app/src/main/res/mipmap-xxhdpi/ic_splash_round.png
  13. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_splash_round.png
  14. 1
      app/src/main/res/values/colors.xml
  15. 14
      app/src/main/res/values/styles.xml

21
app/build.gradle

@ -6,13 +6,13 @@ plugins {
}
android {
compileSdkVersion 30
compileSdkVersion 31
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "org.mosad.teapod"
minSdkVersion 23
targetSdkVersion 30
targetSdkVersion 31
versionCode 9000 //00.09.000
versionName "1.0.0-beta1"
@ -48,17 +48,18 @@ dependencies {
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.1'
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.core:core-splashscreen:1.0.0-beta01'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.1'
implementation 'androidx.navigation:navigation-ui-ktx:2.4.1'
implementation 'androidx.security:security-crypto:1.1.0-alpha03'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.android.material:material:1.5.0'
implementation 'com.google.code.gson:gson:2.8.8' // TODO remove, still used by metadb
implementation 'com.google.android.exoplayer:exoplayer-core:2.15.0'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.15.0'

22
app/src/main/AndroidManifest.xml

@ -11,34 +11,28 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme.Dark">
<activity
android:name="org.mosad.teapod.ui.activity.SplashActivity"
android:label="@string/app_name"
android:theme="@style/SplashTheme"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
android:theme="@style/Theme.App.Starting">
<activity
android:exported="false"
android:name="org.mosad.teapod.ui.activity.onboarding.OnboardingActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan">
</activity>
<activity
android:exported="true"
android:name="org.mosad.teapod.ui.activity.main.MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:exported="false"
android:name="org.mosad.teapod.ui.activity.player.PlayerActivity"
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|layoutDirection"
android:autoRemoveFromRecents="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:parentActivityName="org.mosad.teapod.ui.activity.main.MainActivity"
android:supportsPictureInPicture="true"

18
app/src/main/java/org/mosad/teapod/ui/activity/SplashActivity.kt

@ -1,18 +0,0 @@
package org.mosad.teapod.ui.activity
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import org.mosad.teapod.ui.activity.main.MainActivity
class SplashActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val intent = Intent(this, MainActivity::class.java)
startActivity(intent)
finish()
}
}

4
app/src/main/java/org/mosad/teapod/ui/activity/main/MainActivity.kt

@ -27,6 +27,7 @@ import android.os.Bundle
import android.util.Log
import android.view.MenuItem
import androidx.appcompat.app.AppCompatActivity
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.fragment.app.Fragment
import androidx.fragment.app.commit
import com.google.android.material.navigation.NavigationBarView
@ -62,6 +63,9 @@ class MainActivity : AppCompatActivity(), NavigationBarView.OnItemSelectedListen
}
override fun onCreate(savedInstanceState: Bundle?) {
// Handle the splash screen transition.
installSplashScreen()
super.onCreate(savedInstanceState)
load() // start the initial loading

12
app/src/main/res/drawable/bg_splash.xml

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/black"/>
<item android:gravity="center" android:width="144dp" android:height="144dp">
<bitmap
android:gravity="fill_horizontal|fill_vertical"
android:src="@drawable/ic_splash_logo"/>
</item>
</layer-list>

19
app/src/main/res/drawable/ic_splash_foreground.xml

@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.03158203"
android:scaleY="0.03158203"
android:translateX="37.83"
android:translateY="44.778053">
<path
android:pathData="m850.19,372.71c87.88,-11.01 119.04,-84.97 123.1,-99.87 4.06,-14.89 24.91,-80.57 11.92,-129.36 -12.99,-48.79 -34.36,-72.36 -58.62,-77.25 -24.25,-4.9 -50.59,10.51 -65,32.81 -14.41,22.3 -14.68,45.14 -14.78,55.29 -0.11,10.15 0.76,23.2 -3.37,33.29 -4.13,10.09 3.23,25.71 6.04,35.23 2.81,9.52 9.67,82.62 5.78,115.57 -3.89,32.95 -5.07,34.29 -5.07,34.29zM0.4,23.58C55.81,77.29 56.45,120.86 56.08,132.92c-0.36,12.06 4.77,130.59 11.47,150.76 4.42,13.3 12.11,50.16 41.78,74.48 25.51,20.91 58.65,31.38 58.65,31.38 0,0 36.42,78.46 78.83,108.64 31.56,22.46 39.61,23.74 46.5,35.55 6.18,10.6 93.56,62.62 275.1,47.23 127.29,-10.79 138.56,-44.3 138.56,-44.3 0,0 49.41,-21.9 101.15,-80.43 12.87,-14.56 4.41,-13.21 28.57,-17.79 24.16,-4.58 138.01,-45.58 170.66,-154.36C1039.99,175.32 1017.81,96.01 994.52,69.12 971.23,42.22 931.6,24.18 912.25,24.93c-18.47,0.71 -44.78,4.24 -80.21,46.87 -35.43,42.62 -28.94,37.4 -39.36,41.73 -6.82,2.83 -5.68,3.91 -26.75,-11.65 -20.23,-14.93 -28.9,-21.24 -43.38,-27.24 -7.96,-3.3 2.05,-5.55 2.59,-19.48 0.54,-13.93 2.4,-23.51 -17.32,-23.77 -19.72,-0.26 -408.02,0.21 -408.02,0.21 0,0 -18.8,-1.29 -7.79,24.82 4.2,9.94 -1.45,6.43 -33.27,25.85 -31.82,19.42 -55.58,34.4 -72.28,66.09 -8.43,16 -22.91,23.02 -27.97,8.05C153.44,141.43 125.2,48.96 105.17,23.22 85.56,-1.97 77.8,0.26 77.8,0.26Z"
android:strokeLineJoin="miter"
android:strokeWidth="0.41878"
android:fillColor="#000000"
android:strokeColor="#000000"
android:fillType="evenOdd"
android:strokeLineCap="butt"/>
</group>
</vector>

BIN
app/src/main/res/drawable/ic_splash_logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

5
app/src/main/res/mipmap-anydpi-v26/ic_splash_round.xml

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_splash_background"/>
<foreground android:drawable="@drawable/ic_splash_foreground"/>
</adaptive-icon>

BIN
app/src/main/res/mipmap-hdpi/ic_splash_round.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
app/src/main/res/mipmap-mdpi/ic_splash_round.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
app/src/main/res/mipmap-xhdpi/ic_splash_round.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
app/src/main/res/mipmap-xxhdpi/ic_splash_round.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
app/src/main/res/mipmap-xxxhdpi/ic_splash_round.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

1
app/src/main/res/values/colors.xml

@ -26,4 +26,5 @@
<color name="controlHighlightDark">#11ffffff</color>
<color name="ic_launcher_background">#ffffff</color>
<color name="ic_splash_background">#ffffff</color>
</resources>

14
app/src/main/res/values/styles.xml

@ -71,10 +71,20 @@
</style>
<!-- splash theme -->
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@drawable/bg_splash</item>
<style name="Theme.App.Starting" parent="Theme.SplashScreen">
<!-- Set the splash screen background, animated icon, and animation duration. -->
<item name="windowSplashScreenBackground">@android:color/black</item>
<!-- Use windowSplashScreenAnimatedIcon to add either a drawable or an -->
<!-- animated drawable. One of these is required. -->
<item name="windowSplashScreenAnimatedIcon">@mipmap/ic_splash_round</item>
<item name="windowSplashScreenAnimationDuration">200</item>
<!-- Set the theme of the Activity that directly follows your splash screen. -->
<item name="postSplashScreenTheme">@style/AppTheme.Dark</item> # Required.
</style>
<!-- shapes -->
<style name="ShapeAppearance.Teapod.RoundedPoster" parent="ShapeAppearance.MaterialComponents.LargeComponent">
<item name="cornerFamily">rounded</item>

Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close