Added splash screen
This commit is contained in:
parent
3e175c6305
commit
07814f07b2
9 changed files with 56 additions and 2 deletions
|
@ -13,13 +13,18 @@
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".SplashActivity"
|
||||||
android:screenOrientation="portrait">
|
android:label="@string/app_name"
|
||||||
|
android:theme="@style/SplashTheme">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".MainActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ProgrammingActivity"
|
android:name=".ProgrammingActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
/*
|
||||||
|
* SplashActivity.kt
|
||||||
|
*
|
||||||
|
* Copyright 2016 Erik C. Thauvin (erik@thauvin.net)
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package net.thauvin.erik.android.tesremoteprogrammer
|
||||||
|
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.support.v7.app.AppCompatActivity
|
||||||
|
|
||||||
|
class SplashActivity : AppCompatActivity() {
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
val intent = Intent(this, MainActivity::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
BIN
app/src/main/res/drawable-hdpi/splash.png
Normal file
BIN
app/src/main/res/drawable-hdpi/splash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
app/src/main/res/drawable-mdpi/splash.png
Normal file
BIN
app/src/main/res/drawable-mdpi/splash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.2 KiB |
BIN
app/src/main/res/drawable-xhdpi/splash.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/splash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
BIN
app/src/main/res/drawable-xxhdpi/splash.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/splash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/splash.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/splash.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
12
app/src/main/res/drawable/background_splash.xml
Normal file
12
app/src/main/res/drawable/background_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/white" />
|
||||||
|
|
||||||
|
<item>
|
||||||
|
<bitmap
|
||||||
|
android:gravity="center"
|
||||||
|
android:src="@drawable/splash"/>
|
||||||
|
</item>
|
||||||
|
|
||||||
|
</layer-list>
|
|
@ -6,6 +6,10 @@
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
|
||||||
|
<item name="android:windowBackground">@drawable/background_splash</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="UnderlinePageIndicator">
|
<style name="UnderlinePageIndicator">
|
||||||
<item name="selectedColor">@color/colorAccent</item>
|
<item name="selectedColor">@color/colorAccent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue