[photoeditor] splash screen
This commit is contained in:
Родитель
058387c0de
Коммит
3b9a496690
|
@ -14,13 +14,20 @@
|
|||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name="com.microsoft.device.display.wm_samples.photoeditor.MainActivity">
|
||||
<activity
|
||||
android:name=".SplashActivity"
|
||||
android:theme="@style/Theme.Splash"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
package com.microsoft.device.display.wm_samples.photoeditor
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
class SplashActivity : AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_splash)
|
||||
// move to the app straight away
|
||||
startActivity(Intent(this, MainActivity::class.java))
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
<item
|
||||
android:top="200dp"
|
||||
android:gravity="top|center"
|
||||
android:width="250dp"
|
||||
android:height="250dp"
|
||||
android:drawable="@mipmap/ic_launcher"
|
||||
/>
|
||||
<item android:bottom="84.0dip"
|
||||
android:gravity="bottom|center"
|
||||
android:drawable="@drawable/splash_logo" />
|
||||
/>
|
||||
</layer-list>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
<item
|
||||
android:left="140dp"
|
||||
android:top="200dp"
|
||||
android:gravity="top|start"
|
||||
android:width="250dp"
|
||||
android:height="250dp"
|
||||
android:drawable="@mipmap/ic_launcher"
|
||||
/>
|
||||
<item android:bottom="84.0dip"
|
||||
android:left="220dp"
|
||||
android:gravity="bottom|start"
|
||||
android:drawable="@drawable/splash_logo" />
|
||||
/>
|
||||
</layer-list>
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:opacity="opaque">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
<item
|
||||
android:width="200dp"
|
||||
android:height="200dp"
|
||||
android:gravity="center"
|
||||
android:drawable="@mipmap/ic_launcher"
|
||||
/>
|
||||
<item android:bottom="84.0dip"
|
||||
android:gravity="bottom|center"
|
||||
android:drawable="@drawable/splash_logo" />
|
||||
/>
|
||||
</layer-list>
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:windowBackground="@drawable/splash">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -5,6 +5,12 @@
|
|||
|
||||
<resources>
|
||||
|
||||
<!-- Splash theme -->
|
||||
<style name="Theme.Splash" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:windowBackground">@drawable/splash</item>
|
||||
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
|
||||
</style>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
|
|
Загрузка…
Ссылка в новой задаче