【问题标题】:How to set position items to right in FatList如何在 FatList 中将位置项设置为右侧
【发布时间】:2017-07-27 09:29:34
【问题描述】:

我想像这样从右到左在 FlatList 中显示项目:

我在文档中找不到类似的内容。 请问有什么帮助吗?

【问题讨论】:

    标签: react-native react-native-flatlist


    【解决方案1】:

    你可以使用flex-direction: row-reverse

    这可以帮助您从左到右更改项目。

    检查further information

    【讨论】:

    • 我试试这个:''。 Bt 我得到相同的结果
    • Row component中更新这个样式。
    • 不,它不起作用:(。你的意思是我喜欢这样:rowComponent:'row-reverse'?
    • 没有。 FlatList 有 Row (即 icon 和 label )。您必须转到行视图容器并需要使用flex-direction 属性添加此样式。
    • 啊,我明白你了。但我从数组数据中自动填充行。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-29
    • 1970-01-01
    • 2021-07-07
    相关资源
    最近更新 更多