change splash
@ -1,12 +1,18 @@
|
||||
package app.esteem.mobile.android;
|
||||
|
||||
import android.os.Bundle;
|
||||
import org.devio.rn.splashscreen.SplashScreen;
|
||||
import com.facebook.react.ReactActivity;
|
||||
import com.facebook.react.ReactActivityDelegate;
|
||||
import com.facebook.react.ReactRootView;
|
||||
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
|
||||
|
||||
public class MainActivity extends ReactActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
SplashScreen.show(this, R.style.SplashScreenTheme);
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
/**
|
||||
* Returns the name of the main component registered from JavaScript. This is
|
||||
* used to schedule rendering of the component.
|
||||
@ -22,7 +28,11 @@ public class MainActivity extends ReactActivity {
|
||||
@Override
|
||||
protected ReactRootView createRootView() {
|
||||
return new RNGestureHandlerEnabledRootView(MainActivity.this);
|
||||
}
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
SplashScreen.show(this, R.style.SplashScreenTheme);
|
||||
super.onCreate(savedInstanceState);
|
||||
} }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
BIN
android/app/src/main/res/drawable-hdpi/splash_image.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
android/app/src/main/res/drawable-mdpi/splash_image.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
android/app/src/main/res/drawable-xhdpi/splash_image.png
Normal file
After Width: | Height: | Size: 158 KiB |
BIN
android/app/src/main/res/drawable-xxhdpi/splash_image.png
Normal file
After Width: | Height: | Size: 158 KiB |
11
android/app/src/main/res/drawable/splashscreen.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@color/splashprimary" />
|
||||
<item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@drawable/splash_image" />
|
||||
</item>
|
||||
|
||||
</layer-list>
|
15
android/app/src/main/res/layout/launch_screen.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="0dp"
|
||||
android:contentDescription="Splashscreen"
|
||||
android:scaleType="fitCenter"
|
||||
android:background="@color/splashprimary"
|
||||
android:src="@drawable/splashscreen"/>
|
||||
</RelativeLayout>
|
4
android/app/src/main/res/values/colors-splash.xml
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="splashprimary">#FFFFFF</color>
|
||||
</resources>
|
@ -1,4 +1,8 @@
|
||||
<resources>
|
||||
|
||||
<style name="SplashScreenTheme" parent="SplashScreen_SplashTheme">
|
||||
<item name="colorPrimaryDark">@color/splashprimary</item>
|
||||
</style>
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:windowExitAnimation">@android:anim/fade_out</item>
|
||||
<item name="android:windowBackground">@drawable/launch_screen_bitmap</item>
|
||||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 249 KiB After Width: | Height: | Size: 156 KiB |
Before Width: | Height: | Size: 358 KiB After Width: | Height: | Size: 344 KiB |