8000 解决安卓启动屏在某些模拟器下闪退bug · duheng/Mozi@99c0f1c · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
解决安卓启动屏在某些模拟器下闪退bug
Browse files Browse the repository at this point in the history
  • Loading branch information
duheng committed Jan 20, 2020
1 parent 975c58d commit 99c0f1c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
5 changes: 5 additions & 0 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- this is referenced by react-native-splash-screen and will throw an error if not defined. its value does nothing, just here to avoid a runtime error. -->
<color name="primary_dark">#000000</color>
</resources>
6 changes: 3 additions & 3 deletions src/containers/cheng/CustomPlaceholder.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import { Text, } from 'react-native';
import { Text } from 'react-native';
import Placeholder from 'rn-placeholder';

const customPlaceholder = props => {
const style = { backgroundColor: props.bgColor, };
return <Text style={style}>I m a custom loader with props bgColor = {props.bgColor}</Text>;
const style = { backgroundColor: props.bgColor };
return <Text style={style}>I m a custom loader with props bgColor = {props.bgColor}</Text>;
};
export default Placeholder.connect(customPlaceholder);
16 changes: 8 additions & 8 deletions src/containers/cheng/index.js
B891
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component, } from 'react';
import { StyleSheet, Text, View, } from 'react-native';
import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import Placeholder from 'rn-placeholder';
import CustomPlaceholder from './CustomPlaceholder';

Expand All @@ -8,28 +8,28 @@ const styles = StyleSheet.create({
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
backgroundColor: '#F5FCFF'
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
margin: 10
},
box: {
width: '90%',
margin: 10,
},
margin: 10
}
});

export default class Cheng extends Component {
static navigationOptions = {
headerTitle: '城',
headerTitle: '城'
};
constructor(...args) {
super(...args);

this.state = {
isReady: false,
isReady: false
};
}
render() {
Expand Down

0 comments on commit 99c0f1c

Please sign in to comment.
0