Error in Android: Nesting of View within Text is not supported on Android

Viewed 1290

I am doing with React Native. My UI is like this:

enter image description here

It 's ok in IOS but in Android, error:

Nesting of View within Text is not supported on Android

Codes:

<Text style={styles.text}>
            {'I am a '}
            <Text
              style={styles.text_hili}
              onPress={() => this.showPopupDialog()}>
              {this.state.text_year}
              {this._renderIcon()}
            </Text>
            .....

_renderIcon = () => {
    return <Icon style={styles.icon} type='font-awesome' name={'chevron-down'} size={25} color="white" />
  }

Anybody got this issue. Thanks a lot. If this is a limitation of Android (nested views), how to work around for this situation.

0 Answers
Related