如何在React Native View中显示更多元素?

时间:2019-04-11 20:27:14

标签: ios react-native view render element

我想在我的react native应用程序的主页上显示一个视图,该视图依次显示一个文本元素和一个图标,然后在这两个视图下面显示亚马逊徽标。我尝试过,但只显示徽标。

export default class Header extends Component {
render() {
return (
  <View style={{ flex: 1, flexDirection: 'row' }}>
    <Text style={styles.Title}>Acquista!</Text>
    <Ionicons name="ios-contact" size={42} color='red' style={{ marginTop: 
65, marginLeft: 210 }} />
  </View> ,
  <Logo></Logo>

);
}
}
class Logo extends Component {
render() {
return (
  <View>
    <Image
      style={{ height: 200, width: 200, marginTop: 150 }}
      source={require('./assets/images/amazon.jpg')}
    />

  </View>
);
}
}

1 个答案:

答案 0 :(得分:0)

将所有内容包装到topic_0=[] topic_1=[] topic_2=[] topic_3=[] topic_4=[] topic_5=[] topic_6=[] topic_7=[] topic_8=[] topic_9=[] topic_10=[] topic_11=[] topic_12=[] topic_13=[] topic_14=[] topic_15=[] topic_16=[] topic_17=[] topic_18=[] topic_19=[] for i in a: topic_0.append(i[0][1]) topic_1.append(i[1][1]) topic_2.append(i[2][1]) topic_3.append(i[3][1]) topic_4.append(i[4][1]) topic_5.append(i[5][1]) topic_6.append(i[6][1]) topic_7.append(i[7][1]) topic_8.append(i[8][1]) topic_9.append(i[9][1]) topic_10.append(i[10][1]) topic_11.append(i[11][1]) topic_12.append(i[12][1]) topic_13.append(i[13][1]) topic_14.append(i[14][1]) topic_15.append(i[15][1]) topic_16.append(i[16][1]) topic_17.append(i[17][1]) topic_18.append(i[18][1]) topic_19.append(i[19][1]) d = {'Preprocessed Document': b['Preprocessed Document'].tolist(), 'topic_0': topic_0, 'topic_1': topic_1, 'topic_2': topic_2, 'topic_3': topic_3, 'topic_4': topic_4, 'topic_5': topic_5, 'topic_6': topic_6, 'topic_7': topic_7, 'topic_8': topic_8, 'topic_9': topic_9, 'topic_10': topic_10, 'topic_11': topic_11, 'topic_12': topic_12, 'topic_13': topic_13, 'topic_14': topic_14, 'topic_15': topic_15, 'topic_16': topic_16, 'topic_17': topic_17, 'topic_18': topic_18, 'topic_19': topic_19} df = pd.DataFrame(data=d) df.to_csv("test.csv", index=False, mode = 'a')

View