ListView grid in React Native

后端 未结 9 1978
长发绾君心
长发绾君心 2020-11-28 02:18

I\'m building a simple app in React Native that fetches listings from a remote JSON source and displays them on screen.

So far, using the excellent example here, I\

9条回答
  •  再見小時候
    2020-11-28 02:49

    I'm adding this as an answer because overflow comments are hidden under Colin Ramsay's response: as of React Native 0.28, you also need alignItems: 'flex-start', in the listview styling or the flexWrap won't work. Thanks to Kerumen on codedump.io for this. So,

    var styles = StyleSheet.create({
    list: {
        flexDirection: 'row',
        flexWrap: 'wrap',
        alignItems: 'flex-start',
    },
    

    ...with the rest as in Colin's response.

提交回复
热议问题