add splash activity

This commit is contained in:
Jannik 2020-11-01 20:17:17 +01:00
parent 49430e10bf
commit 8a516c640d
Signed by: Seil0
GPG Key ID: E8459F3723C52C24
5 changed files with 45 additions and 7 deletions

View File

@ -11,20 +11,25 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".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>
<activity
android:name=".PlayerActivity"
android:label="@string/app_name"
android:configChanges="orientation|screenSize|layoutDirection"
android:theme="@style/PlayerTheme" />
android:theme="@style/PlayerTheme"
android:configChanges="orientation|screenSize|layoutDirection" />
<activity
android:name=".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>
</application>

View File

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

View File

@ -0,0 +1,12 @@
<?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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -14,6 +14,10 @@
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@drawable/bg_splash</item>
</style>
<!-- shapes -->
<style name="ShapeAppearance.Teapod.RoundedPoster" parent="ShapeAppearance.MaterialComponents.LargeComponent">
<item name="cornerFamily">rounded</item>