如何解决react native里的Listview的文字换行问题?
render: function() {
return (
<ListView
dataSource={this.state.dataSource}
renderRow={this._renderRow}/>
);
},
_renderRow: function(rowData: string, sectionID: number, rowID: number) {
return (
<View>
<TouchableHighlight>
<View style={styles.row}>
<View style={styles.questionInfo}>
<Text>{rowData.user.name} · {rowData.createdDate}</Text>
</View>
<View style={styles.questionTitle}>
<Text>{rowData.title}</Text>
</View>
</View>
</TouchableHighlight>
<View style={styles.separator} />
</View>
);
},
llkkjj
9 years, 10 months ago