diff --git a/android/app/build.gradle b/android/app/build.gradle index f5b085b..690eda8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -118,7 +118,7 @@ def jscFlavor = 'org.webkit:android-jsc:+' * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode * and the benefits of using Hermes will therefore be sharply reduced. */ -def enableHermes = project.ext.react.get("enableHermes", false); +def enableHermes = project.ext.react.get("enableHermes", false) android { ndkVersion rootProject.ext.ndkVersion @@ -190,7 +190,6 @@ dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" // From node_modules - implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 010620f..ae48196 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -9,16 +9,25 @@ android:icon="@mipmap/ic_launcher" android:allowBackup="false" android:theme="@style/AppTheme"> + + + + + + + + - - - - - + android:windowSoftInputMode="adjustResize" + android:exported="true" + /> diff --git a/android/app/src/main/java/com/sociquote/MainApplication.java b/android/app/src/main/java/com/sociquote/MainApplication.java index 5fc1b59..73ee58c 100644 --- a/android/app/src/main/java/com/sociquote/MainApplication.java +++ b/android/app/src/main/java/com/sociquote/MainApplication.java @@ -27,6 +27,7 @@ protected List getPackages() { List packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for example: // packages.add(new MyReactNativePackage()); + new SplashScreenReactPackage(); return packages; } diff --git a/android/app/src/main/java/com/sociquote/SplashActivity.java b/android/app/src/main/java/com/sociquote/SplashActivity.java new file mode 100644 index 0000000..816b420 --- /dev/null +++ b/android/app/src/main/java/com/sociquote/SplashActivity.java @@ -0,0 +1,17 @@ +package com.sociquote; + +import android.content.Intent; +import android.os.Bundle; + +import androidx.appcompat.app.AppCompatActivity; + +public class SplashActivity extends AppCompatActivity { + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + Intent intent = new Intent(this, MainActivity.class); + startActivity(intent); + finish(); + } +} \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index caf8199..4e9721e 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -9,4 +9,11 @@ @color/background false + diff --git a/package.json b/package.json index bb85faf..af2dcaf 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "private": true, "scripts": { "build:android": "cd android && ./gradlew assembleRelease", - "android": "react-native run-android", + "clean:android": "cd android && ./gradlew clean", + "start:android": "react-native run-android", "ios": "react-native run-ios", "start": "react-native start", "test": "jest",