Splashscreen + Fix default img

This commit is contained in:
Vincent BRIDIER 2023-01-03 12:55:28 +01:00
parent 326580d76f
commit c722ddde4d
No known key found for this signature in database
GPG key ID: 8571BFA20420D512
31 changed files with 20 additions and 32 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/primary"
android:gravity="center">
<ImageView
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_marginTop="24dp"
android:src="@drawable/launch_screen" />
</LinearLayout>

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -60,7 +60,6 @@ project.rootProject.allprojects {
resolutionStrategy {
force "com.facebook.react:react-native:0.70.+"
force "com.facebook.react:hermes-engine:0.70.+"
//force 'androidx.work:work-runtime:2.6.0'
}
}
}

View file

@ -1,4 +1,3 @@
// V2
import React from 'react';
// Redux
import { Provider } from 'react-redux';
@ -32,16 +31,14 @@ import SearchScreen from "./App/Views/SearchScreen";
import MySpaceScreen from './App/Views/MySpaceScreen';
// Style
import styles from './Resources/Styles/NavigationStyle';
// END V2
// V2
//SplashScreen.preventAutoHideAsync(); //Keep
SplashScreen.preventAutoHideAsync(); //Keep
store.dispatch({ type: 'INIT' });
store.dispatch({ type: 'INIT_LOCALE' });
store.dispatch({ type: 'INIT_USERS' });
const Stack = createNativeStackNavigator();
// END V2
class App extends React.Component {
state = {
@ -280,6 +277,7 @@ class App extends React.Component {
}
LogoTitle(navigation, title, wantBtn = true) {
console.log(this.state.isSetup)
return (
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<TouchableOpacity onPress={() => {
@ -295,7 +293,7 @@ class App extends React.Component {
) : (
<Image
style={{ width: 100, height: 50, resizeMode: 'stretch' }}
source={require('./assets/img/logo.png')}
source={require('./Resources/assets/img/logo.png')}
/>
)}
</TouchableOpacity>

View file

@ -12,7 +12,7 @@ const initialState = {
currentOpenedDoc: {},
ShowIsActive: 0,
HomeBtns: {},
mainColor: '#ea4f52'
mainColor: '#D4021D'
};
const reducer = (state = initialState, action) => {

View file

@ -7,6 +7,8 @@ import { connect } from 'react-redux';
import { initDocuments } from '../Store/Actions/documents';
import { initContact } from '../Store/Actions/contacts';
import { initDirectories } from '../Store/Actions/directories';
// SplashScreen
import * as SplashScreen from 'expo-splash-screen';
// Style
import styles from '../../Resources/Styles/HomeStyle';
// Translations
@ -50,6 +52,8 @@ class HomeScreen extends React.Component {
this.props.initBtns();
this.props.initContact(this.props.currentUser);
this.props.initDirectories(this.props.locale.value, this.props.currentUser);
SplashScreen.hideAsync();
}
unsubscribe() {

View file

@ -2,6 +2,8 @@ import React from 'react';
import { ImageBackground, View, Image, Text, TextInput, Button, Alert } from 'react-native';
// Redux
import { connect } from 'react-redux';
// SplashScreen
import * as SplashScreen from 'expo-splash-screen';
// Helpers
import Helpers from '../Lib/Helpers';
// Lodash
@ -29,6 +31,7 @@ function mapStateToProps(state) {
const mapDispatchToProps = dispatch => {
return {
setIsSetup: () => dispatch({ type: 'SET_ISSETUP' }),
init: () => dispatch({ type: 'INIT' })
};
};
class InstallScreen extends React.Component {
@ -38,6 +41,10 @@ class InstallScreen extends React.Component {
url: "https://dev-app.rhd-ldc.fr",
}
componentDidMount() {
SplashScreen.hideAsync();
}
render() {
return (
<ImageBackground source={require('../../Resources/assets/img/background_ldc.png')} style={commonStyles.background}>
@ -154,6 +161,7 @@ class InstallScreen extends React.Component {
resUsers.forEach(user => {
User.add(user);
});
this.props.init();
this.props.setIsSetup();
this.props.navigation.navigate('LoginScreen');
}

View file

@ -2,6 +2,8 @@ import React from 'react';
import { View, ImageBackground, TextInput, Button, Image, Alert } from 'react-native';
// Redux
import { connect } from 'react-redux';
// SplashScreen
import * as SplashScreen from 'expo-splash-screen';
// Common Styles
import commonStyles from '../../Resources/CommonStyles';
// Style
@ -41,6 +43,7 @@ class LoginScreen extends React.Component {
if (SyncController.isLogged()) {
this.props.setCurrentUser(false);
}
SplashScreen.hideAsync();
}
render() {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB