Commit 15a6d88c by OuiAtichat

show logo when loading & remove unuse component & add more gitignore

parent 62758dd9
node_modules/**/* # OSX
.expo/* #
npm-debug.* .DS_Store
*.jks
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/
web-report/
# Xcode # Xcode
# #
build/ build/
Pods/
*.pbxuser *.pbxuser
!default.pbxuser !default.pbxuser
*.mode1v3 *.mode1v3
...@@ -36,4 +28,29 @@ build/ ...@@ -36,4 +28,29 @@ build/
.idea .idea
.gradle .gradle
local.properties local.properties
*.iml *.iml
\ No newline at end of file
# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# BUCK
buck-out/
\.buckd/
*.keystore
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
# Bundle artifact
*.jsbundle
\ No newline at end of file
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
android:name="com.rn_safetcutapp.MainActivity" android:name="com.rn_safetcutapp.MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize" > android:windowSoftInputMode="adjustResize" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
......
#Mon Jul 22 15:06:25 ICT 2019 #Tue Jul 23 00:19:36 ICT 2019
base.0=/home/haouiha/Documents/safetcut-app/android/app/build/intermediates/transforms/dexMerger/debug/0 base.0=/home/haouiha/Documents/safetcut-app/android/app/build/intermediates/transforms/dexMerger/debug/0
path.0=classes.dex path.0=classes.dex
renamed.0=classes.dex renamed.0=classes.dex
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
android:name="com.rn_safetcutapp.MainActivity" android:name="com.rn_safetcutapp.MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize" > android:windowSoftInputMode="adjustResize" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
android:name="com.rn_safetcutapp.MainActivity" android:name="com.rn_safetcutapp.MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize" > android:windowSoftInputMode="adjustResize" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
......
-- Merging decision tree log --- -- Merging decision tree log ---
manifest manifest
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:1-31:12 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:1-32:12
INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:1-31:12 INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:1-32:12
INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:1-31:12 INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:1-32:12
INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:1-31:12 INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:1-32:12
MERGED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:1-31:12 MERGED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:1-32:12
MERGED from [:@react-native-community_async-storage] /home/haouiha/Documents/safetcut-app/node_modules/@react-native-community/async-storage/android/build/intermediates/library_manifest/debug/AndroidManifest.xml:2:1-9:12 MERGED from [:@react-native-community_async-storage] /home/haouiha/Documents/safetcut-app/node_modules/@react-native-community/async-storage/android/build/intermediates/library_manifest/debug/AndroidManifest.xml:2:1-9:12
MERGED from [:react-native-camera] /home/haouiha/Documents/safetcut-app/node_modules/react-native-camera/android/build/intermediates/library_manifest/generalDebug/AndroidManifest.xml:2:1-18:12 MERGED from [:react-native-camera] /home/haouiha/Documents/safetcut-app/node_modules/react-native-camera/android/build/intermediates/library_manifest/generalDebug/AndroidManifest.xml:2:1-18:12
MERGED from [:react-native-date-picker] /home/haouiha/Documents/safetcut-app/node_modules/react-native-date-picker/android/build/intermediates/library_manifest/debug/AndroidManifest.xml:2:1-11:12 MERGED from [:react-native-date-picker] /home/haouiha/Documents/safetcut-app/node_modules/react-native-date-picker/android/build/intermediates/library_manifest/debug/AndroidManifest.xml:2:1-11:12
...@@ -71,13 +71,13 @@ INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/debug/Android ...@@ -71,13 +71,13 @@ INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/debug/Android
INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/debug/AndroidManifest.xml INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/debug/AndroidManifest.xml
android:versionName android:versionName
INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:1-31:12 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:1-32:12
INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/debug/AndroidManifest.xml INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/debug/AndroidManifest.xml
xmlns:tools xmlns:tools
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/debug/AndroidManifest.xml:3:5-51 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/debug/AndroidManifest.xml:3:5-51
android:versionCode android:versionCode
INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:1-31:12 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:1-32:12
INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/debug/AndroidManifest.xml INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/debug/AndroidManifest.xml
xmlns:android xmlns:android
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:11-69 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:1:11-69
...@@ -108,9 +108,9 @@ ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidMani ...@@ -108,9 +108,9 @@ ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidMani
android:name android:name
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:9:22-78 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:9:22-78
application application
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:11:5-29:19 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:11:5-30:19
MERGED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:11:5-29:19 MERGED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:11:5-30:19
MERGED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:11:5-29:19 MERGED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:11:5-30:19
MERGED from [com.facebook.react:react-native:0.60.4] /home/haouiha/.gradle/caches/transforms-2/files-2.1/59225a7c638b0aaeaa5e594e3af72771/AndroidManifest.xml:11:5-20 MERGED from [com.facebook.react:react-native:0.60.4] /home/haouiha/.gradle/caches/transforms-2/files-2.1/59225a7c638b0aaeaa5e594e3af72771/AndroidManifest.xml:11:5-20
MERGED from [com.facebook.react:react-native:0.60.4] /home/haouiha/.gradle/caches/transforms-2/files-2.1/59225a7c638b0aaeaa5e594e3af72771/AndroidManifest.xml:11:5-20 MERGED from [com.facebook.react:react-native:0.60.4] /home/haouiha/.gradle/caches/transforms-2/files-2.1/59225a7c638b0aaeaa5e594e3af72771/AndroidManifest.xml:11:5-20
MERGED from [com.facebook.soloader:soloader:0.6.0] /home/haouiha/.gradle/caches/transforms-2/files-2.1/dd4d92d4a69e0fa98d0a79301e7be9ac/AndroidManifest.xml:11:5-20 MERGED from [com.facebook.soloader:soloader:0.6.0] /home/haouiha/.gradle/caches/transforms-2/files-2.1/dd4d92d4a69e0fa98d0a79301e7be9ac/AndroidManifest.xml:11:5-20
...@@ -162,7 +162,9 @@ MERGED from [net.time4j:time4j-android:4.2-2018i] /home/haouiha/.gradle/caches/t ...@@ -162,7 +162,9 @@ MERGED from [net.time4j:time4j-android:4.2-2018i] /home/haouiha/.gradle/caches/t
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:12:7-38 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:12:7-38
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:12:7-38 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:12:7-38
activity#com.rn_safetcutapp.MainActivity activity#com.rn_safetcutapp.MainActivity
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:18:7-27:18 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:18:7-28:18
android:screenOrientation
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:23:9-45
android:label android:label
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:20:9-41 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:20:9-41
android:windowSoftInputMode android:windowSoftInputMode
...@@ -172,19 +174,19 @@ ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidMani ...@@ -172,19 +174,19 @@ ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidMani
android:name android:name
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:19:9-37 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:19:9-37
intent-filter#action:name:android.intent.action.MAIN+category:name:android.intent.category.LAUNCHER intent-filter#action:name:android.intent.action.MAIN+category:name:android.intent.category.LAUNCHER
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:23:9-26:25 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:24:9-27:25
action#android.intent.action.MAIN action#android.intent.action.MAIN
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:24:13-65 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:25:13-65
android:name android:name
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:24:21-62 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:25:21-62
category#android.intent.category.LAUNCHER category#android.intent.category.LAUNCHER
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:25:13-73 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:26:13-73
android:name android:name
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:25:23-70 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:26:23-70
activity#com.facebook.react.devsupport.DevSettingsActivity activity#com.facebook.react.devsupport.DevSettingsActivity
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:28:7-84 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:29:7-84
android:name android:name
ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:28:17-81 ADDED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml:29:17-81
uses-sdk uses-sdk
INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml reason: use-sdk injection requested INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml reason: use-sdk injection requested
INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml INJECTED from /home/haouiha/Documents/safetcut-app/android/app/src/main/AndroidManifest.xml
......
import React, { Component } from 'react';
import { Header } from 'react-native-elements';
class HeaderComponent extends Component {
render() {
const { leftComponent, centerComponent, rightComponent, ...rest } = this.props;
return (
<Header
statusBarProps={{ barStyle: 'light-content' }}
backgroundColor="#f44c4c"
leftComponent={leftComponent}
centerComponent={centerComponent}
rightComponent={rightComponent}
{...rest}
/>
);
}
}
export default HeaderComponent;
import React, { Component } from 'react';
import { Container, Icon, Text } from 'native-base';
import HeaderComponent from './HeaderComponent';
import FooterCompenent from '../../screens/Private/PrivateContent';
import { Actions } from 'react-native-router-flux';
const LeftComponent = () => <Icon name="menu" style={{ color: 'white', fontSize: 24 }} />;
const CenterComponent = () => <Text>Untitled</Text>;
const RightComponent = () => <Icon name="notifications" style={{ color: 'white', fontSize: 24 }} />;
class LayoutComponent extends Component {
render() {
const { children } = this.props;
return (
<Container>
<HeaderComponent
leftComponent={<LeftComponent />}
centerComponent={<CenterComponent />}
rightComponent={<RightComponent />}
/>
</Container>
);
}
}
export default LayoutComponent;
import React, { Component } from 'react'; import React, { Component } from 'react';
import { ActivityIndicator, View, StatusBar } from 'react-native'; import { ActivityIndicator, View, StatusBar, Image } from 'react-native';
import AsyncStorage from '@react-native-community/async-storage'; //expo not yet support import AsyncStorage from '@react-native-community/async-storage'; //expo not yet support
import logo from '../../assets/images/logo.png';
import { width } from '../../constants/Layout';
export default class AuthLoadingScreen extends Component { export default class AuthLoadingScreen extends Component {
static navigationOptions = { static navigationOptions = {
header: null, header: null,
}; };
state = {
// swichingRoute = async () => { isShowImg: true,
// const alreadyLaunched = await AsyncStorage.getItem('alreadyLaunched'); };
// this.props.navigation.navigate(alreadyLaunched ? 'Login' : 'Onboarding');
// };
performTimeConsumingTask = async () => { performTimeConsumingTask = async () => {
return new Promise(resolve => return new Promise(resolve =>
setTimeout(() => { setTimeout(() => {
resolve('loadingCompleted'); resolve('loadingCompleted');
}, 1500) }, 1700)
); );
}; };
showLogoThenIndicator = () => {
setTimeout(() => {
this.setState({ isShowImg: false });
}, 1300);
};
async componentDidMount() { async componentDidMount() {
this.showLogoThenIndicator();
// Preload data from an external API // Preload data from an external API
// Preload data using AsyncStorage // Preload data using AsyncStorage
const alreadyLaunched = await AsyncStorage.getItem('alreadyLaunched'); const alreadyLaunched = await AsyncStorage.getItem('alreadyLaunched');
const RememberedLogin = await AsyncStorage.getItem('RememberedLogin'); const RememberedLogin = await AsyncStorage.getItem('RememberedLogin');
// console.log(alreadyLaunched, RememberedLogin);
const loading = await this.performTimeConsumingTask(); const loading = await this.performTimeConsumingTask();
if (loading) { if (loading) {
RememberedLogin RememberedLogin
...@@ -35,10 +40,21 @@ export default class AuthLoadingScreen extends Component { ...@@ -35,10 +40,21 @@ export default class AuthLoadingScreen extends Component {
: this.props.navigation.navigate(alreadyLaunched ? 'Login' : 'Onboarding'); : this.props.navigation.navigate(alreadyLaunched ? 'Login' : 'Onboarding');
} }
} }
render() { render() {
return ( return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}> <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<ActivityIndicator size="large" color="#f44c4c" /> {this.state.isShowImg ? (
<Image
style={{
width: width * 0.9,
resizeMode: 'contain',
}}
source={logo}
/>
) : (
<ActivityIndicator size="large" color="#f44c4c" />
)}
{/* <StatusBar hidden /> */} {/* <StatusBar hidden /> */}
</View> </View>
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment