Compare commits
4 commits
5b13eacc12
...
89c65d7070
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89c65d7070 | ||
|
|
97d6e1dffc | ||
|
|
85b0b9de29 | ||
|
|
5c1052fbd4 |
4 changed files with 16 additions and 30 deletions
|
|
@ -23,7 +23,7 @@ public class MainActivity extends ReactActivity {
|
|||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
SplashScreen.show(this);
|
||||
SplashScreen.show(this, R.style.SplashScreenTheme);
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,4 +7,8 @@
|
|||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
</style>
|
||||
</resources>
|
||||
<style name="SplashScreenTheme" parent="SplashScreen_SplashTheme">
|
||||
<item name="android:navigationBarColor">@color/activityBackground</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -20,18 +20,16 @@
|
|||
// @flow
|
||||
|
||||
import * as React from 'react';
|
||||
import {Image, Platform, View} from 'react-native';
|
||||
import {FAB, TouchableRipple, withTheme} from 'react-native-paper';
|
||||
import {Image, View} from 'react-native';
|
||||
import {FAB} from 'react-native-paper';
|
||||
import * as Animatable from 'react-native-animatable';
|
||||
import FOCUSED_ICON from '../../../assets/tab-icon.png';
|
||||
import UNFOCUSED_ICON from '../../../assets/tab-icon-outline.png';
|
||||
import type {CustomThemeType} from '../../managers/ThemeManager';
|
||||
|
||||
type PropsType = {
|
||||
focused: boolean,
|
||||
onPress: () => void,
|
||||
onLongPress: () => void,
|
||||
theme: CustomThemeType,
|
||||
tabBarHeight: number,
|
||||
};
|
||||
|
||||
|
|
@ -84,20 +82,9 @@ class TabHomeIcon extends React.Component<PropsType> {
|
|||
color: string,
|
||||
}): React.Node => {
|
||||
const {focused} = this.props;
|
||||
if (focused)
|
||||
return (
|
||||
<Image
|
||||
source={FOCUSED_ICON}
|
||||
style={{
|
||||
width: size,
|
||||
height: size,
|
||||
tintColor: color,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
return (
|
||||
<Image
|
||||
source={UNFOCUSED_ICON}
|
||||
source={focused ? FOCUSED_ICON : UNFOCUSED_ICON}
|
||||
style={{
|
||||
width: size,
|
||||
height: size,
|
||||
|
|
@ -115,15 +102,7 @@ class TabHomeIcon extends React.Component<PropsType> {
|
|||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
}}>
|
||||
<TouchableRipple
|
||||
onPress={props.onPress}
|
||||
onLongPress={props.onLongPress}
|
||||
borderless
|
||||
rippleColor={
|
||||
Platform.OS === 'android'
|
||||
? props.theme.colors.primary
|
||||
: 'transparent'
|
||||
}
|
||||
<View
|
||||
style={{
|
||||
position: 'absolute',
|
||||
bottom: 0,
|
||||
|
|
@ -137,16 +116,18 @@ class TabHomeIcon extends React.Component<PropsType> {
|
|||
easing="ease-out"
|
||||
animation={props.focused ? 'fabFocusIn' : 'fabFocusOut'}
|
||||
icon={this.getIconRender}
|
||||
onPress={props.onPress}
|
||||
onLongPress={props.onLongPress}
|
||||
style={{
|
||||
marginTop: 15,
|
||||
marginLeft: 'auto',
|
||||
marginRight: 'auto',
|
||||
}}
|
||||
/>
|
||||
</TouchableRipple>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default withTheme(TabHomeIcon);
|
||||
export default TabHomeIcon;
|
||||
|
|
|
|||
|
|
@ -94,11 +94,12 @@ class TabIcon extends React.Component<PropsType> {
|
|||
<TouchableRipple
|
||||
onPress={props.onPress}
|
||||
onLongPress={props.onLongPress}
|
||||
borderless
|
||||
rippleColor={props.theme.colors.primary}
|
||||
borderless
|
||||
style={{
|
||||
flex: 1,
|
||||
justifyContent: 'center',
|
||||
borderRadius: 10
|
||||
}}>
|
||||
<View>
|
||||
<Animatable.View
|
||||
|
|
|
|||
Loading…
Reference in a new issue