【问题标题】:Render inline elements in FlatList in react native在本机反应中渲染 FlatList 中的内联元素
【发布时间】:2020-06-24 14:38:12
【问题描述】:

您好,我正在尝试在 flatlist 中并排呈现一些文本,我想让文本占据上一行的所有可用空间,就像在 css 中使用显示内联一样,我不能在 flatlist 中这样做

我想渲染这张照片中的文字

enter image description here

【问题讨论】:

    标签: react-native stylesheet react-native-flatlist


    【解决方案1】:

    您可以使用嵌套的Text 组件:

    <Text> text 1 <Text> text2 </Text> </Text>
    

    我已将此技术与map 及其工作的 al hamdolilah 一起使用:

    这里是snack example

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-08-21
    相关资源
    最近更新 更多