mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-06-19 21:05:25 +08:00
Implement splash screen for cold start
This commit is contained in:
parent
2b52fcaa50
commit
547af36b73
@ -26,7 +26,7 @@
|
||||
|
||||
<activity
|
||||
android:name=".activities.MainActivity"
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:theme="@style/AppTheme.SplashScreen"
|
||||
android:launchMode="singleTop">
|
||||
|
||||
<intent-filter>
|
||||
|
||||
@ -101,6 +101,7 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
setTheme(R.style.AppTheme_NoActionBar);
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
initAppState();
|
||||
|
||||
14
app/src/main/res/drawable-v23/splash_screen.xml
Normal file
14
app/src/main/res/drawable-v23/splash_screen.xml
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:opacity="opaque">
|
||||
|
||||
<item android:drawable="@color/colorPrimary" />
|
||||
|
||||
<item
|
||||
android:drawable="@drawable/ic_logo"
|
||||
android:width="128dp"
|
||||
android:height="128dp"
|
||||
android:gravity="center"
|
||||
tools:targetApi="m" />
|
||||
</layer-list>
|
||||
12
app/src/main/res/drawable/splash_screen.xml
Normal file
12
app/src/main/res/drawable/splash_screen.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"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:opacity="opaque">
|
||||
|
||||
<item android:drawable="@color/colorPrimary" />
|
||||
|
||||
<item
|
||||
android:drawable="@drawable/ic_logo"
|
||||
android:gravity="center"
|
||||
tools:targetApi="m" />
|
||||
</layer-list>
|
||||
@ -4,6 +4,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activities.MainActivity"
|
||||
android:background="@android:color/transparent"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
@ -14,6 +14,10 @@
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.SplashScreen" parent="AppTheme.NoActionBar">
|
||||
<item name="android:windowBackground">@drawable/splash_screen</item>
|
||||
</style>
|
||||
|
||||
<style name="AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<style name="PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
Loading…
Reference in New Issue
Block a user