add splash activity
This commit is contained in:
		| @ -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> | ||||
|  | ||||
|  | ||||
							
								
								
									
										17
									
								
								app/src/main/java/org/mosad/teapod/SplashActivity.kt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								app/src/main/java/org/mosad/teapod/SplashActivity.kt
									
									
									
									
									
										Normal 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() | ||||
|     } | ||||
| } | ||||
							
								
								
									
										12
									
								
								app/src/main/res/drawable/bg_splash.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								app/src/main/res/drawable/bg_splash.xml
									
									
									
									
									
										Normal 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> | ||||
							
								
								
									
										
											BIN
										
									
								
								app/src/main/res/drawable/ic_splash_logo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								app/src/main/res/drawable/ic_splash_logo.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 10 KiB | 
| @ -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> | ||||
|  | ||||
		Reference in New Issue
	
	Block a user