123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /**
- * Created by zack on 2018/4/30.
- */
- import {
- View,
- Text,
- StyleSheet,
- Image,
- TouchableOpacity,
- TextInput
- } from 'react-native'
- import React, {Component} from 'react'
- import {NavigationBarHeight, TabBarHeight, ScreenDimensions} from '../../../../utils/DimensionsTools'
-
- export default class MyAnswerBlankItem extends Component {
- constructor(props) {
- super(props)
- this.state = {
- tips: props.tips
- }
- }
-
- componentWillReceiveProps(props) {
- this.setState({
- tips: props.tips
- })
- }
-
- shouldComponentUpdate(nextProps) {
- if (nextProps.tips !== this.state.tips) {
- return true
- }
-
- return false
- }
-
- render() {
- return(
- <View style={styles.View}>
- <Text style={styles.Text}>{this.state.tips}</Text>
- </View>
- )
- }
- }
-
- const styles = StyleSheet.create({
- View: {
- width: ScreenDimensions.width,
- backgroundColor: '#efeff4',
- alignItems: 'center'
- },
- Text: {
- marginTop: 114,
- fontSize: 15,
- color: '#9c9c9c'
- }
- })
|