mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-13 01:17:21 -04:00
Android Added Splash Screen on startup
This commit is contained in:
parent
3c3201be42
commit
a9a5c65a58
@ -28,6 +28,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".KiwixMobileActivity"
|
android:name=".KiwixMobileActivity"
|
||||||
android:configChanges="orientation|keyboardHidden|screenSize|locale"
|
android:configChanges="orientation|keyboardHidden|screenSize|locale"
|
||||||
|
android:theme="@style/AppTheme.Launcher"
|
||||||
android:label="@string/app_name">
|
android:label="@string/app_name">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
10
res/drawable/launch_screen.xml
Normal file
10
res/drawable/launch_screen.xml
Normal 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>
|
BIN
res/drawable/splash_screen.png
Normal file
BIN
res/drawable/splash_screen.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
@ -25,6 +25,10 @@
|
|||||||
<item name="selectedBackground">@drawable/list_bg_light</item>
|
<item name="selectedBackground">@drawable/list_bg_light</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="AppTheme.Launcher">
|
||||||
|
<item name="android:windowBackground">@drawable/launch_screen</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
|
<style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
|
||||||
<item name="spinBars">true</item>
|
<item name="spinBars">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
@ -271,7 +271,7 @@ public class KiwixMobileActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
requestWindowFeature(Window.FEATURE_PROGRESS);
|
requestWindowFeature(Window.FEATURE_PROGRESS);
|
||||||
|
setTheme(R.style.AppTheme);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
handleLocaleCheck();
|
handleLocaleCheck();
|
||||||
setContentView(R.layout.main);
|
setContentView(R.layout.main);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user