This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
android { | |
... | |
flavorDimensions "default" | |
productFlavors { | |
prod { | |
minSdkVersion rootProject.ext.minSdkVersion | |
applicationId 'com.rn_base' | |
targetSdkVersion rootProject.ext.targetSdkVersion | |
resValue "string", "build_config_package", "com.rn_base" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<resources> | |
<!-- Base application theme. --> | |
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> | |
<!-- Customize your theme here. --> | |
</style> | |
<!-- BootTheme should inherit from Theme.SplashScreen --> | |
<style name="BootTheme" parent="Theme.SplashScreen"> | |
<item name="windowSplashScreenBackground">@color/bootsplash_background_dark</item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<resources> | |
<color name="bootsplash_background">#FFF5E6</color> | |
<color name="bootsplash_background_dark">#020f25</color> // Add this line | |
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.rn_base; | |
import com.facebook.react.ReactActivity; | |
import com.facebook.react.ReactActivityDelegate; // add this line | |
import com.zoontek.rnbootsplash.RNBootSplash; // add this line | |
public class MainActivity extends ReactActivity { | |
// ... | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.rn_base"> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<application | |
android:name=".MainApplication" | |
android:label="@string/app_name" | |
android:icon="@mipmap/ic_launcher" | |
android:roundIcon="@mipmap/ic_launcher_round" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<resources> | |
<!-- Base application theme. --> | |
<style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> | |
<!-- Customize your theme here. --> | |
</style> | |
<!-- BootTheme should inherit from Theme.SplashScreen --> | |
<style name="BootTheme" parent="Theme.SplashScreen"> | |
<item name="windowSplashScreenBackground">@color/bootsplash_background</item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
// ... | |
implementation "androidx.core:core-splashscreen:1.0.0-alpha02" // add this line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
ext { | |
buildToolsVersion = "30.0.2" | |
minSdkVersion = 23 // Change this | |
compileSdkVersion = 31 // Change this | |
targetSdkVersion = 31 // Change this | |
ndkVersion = "21.4.7075529" | |
} | |
// ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "AppDelegate.h" | |
#import <React/RCTBridge.h> | |
#import <React/RCTBundleURLProvider.h> | |
#import <React/RCTRootView.h> | |
#import "RNBootSplash.h" // add this line | |
// ... | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {View, Text, TouchableOpacity} from 'react-native'; | |
import {useDispatch, useSelector} from 'react-redux'; | |
import { | |
decrementCount, | |
incrementCount, | |
} from '../../redux/actions/CounterActions'; | |
import {selectCounterValue} from '../../redux/selectors/CounterSelector'; | |
import {persistor} from '../../redux/store'; |
NewerOlder