【问题标题】:How to show all texts in single line instead of new lines?如何在单行而不是新行中显示所有文本?
【发布时间】:2020-01-02 11:38:57
【问题描述】:

从下面提到的代码中,得到如图中第二行所示的结果:

如何在单行中显示所有文本元素,如图中的第一行所示。

<Thumbnail square  source={{ uri: some uri }} />
<Text>Butter</Text>
<TextInput
   placeholder="-"
   keyboardType='number-pad'
/>
<Text>Kg</Text>

【问题讨论】:

标签: react-native


【解决方案1】:

试试这个:

<Thumbnail square  source={{ uri: some uri }} />
   <View style={{flexDirection:'row}} > 
      <Text>Butter</Text>
      <TextInput
        placeholder="-"
        keyboardType='number-pad'
        />
    <Text>Kg</Text>
  </View>

【讨论】:

    猜你喜欢
    • 2016-11-29
    • 2022-07-19
    • 2021-10-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-19
    • 2017-05-27
    相关资源
    最近更新 更多