Android Added Splash Screen on startup

This commit is contained in:
mhutti1 2016-08-03 22:38:47 +01:00
parent 3c3201be42
commit a9a5c65a58
5 changed files with 16 additions and 1 deletions

View File

@ -28,6 +28,7 @@
<activity
android:name=".KiwixMobileActivity"
android:configChanges="orientation|keyboardHidden|screenSize|locale"
android:theme="@style/AppTheme.Launcher"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
<!-- The background color, preferably the same as your normal theme -->
<item android:drawable="@android:color/white"/>
<item>
<bitmap
android:src="@drawable/splash_screen"
android:gravity="center"/>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -25,6 +25,10 @@
<item name="selectedBackground">@drawable/list_bg_light</item>
</style>
<style name="AppTheme.Launcher">
<item name="android:windowBackground">@drawable/launch_screen</item>
</style>
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
<item name="spinBars">true</item>
</style>

View File

@ -271,7 +271,7 @@ public class KiwixMobileActivity extends AppCompatActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_PROGRESS);
setTheme(R.style.AppTheme);
super.onCreate(savedInstanceState);
handleLocaleCheck();
setContentView(R.layout.main);