首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用shoutem/ui和react原生创建内联facepile

如何使用shoutem/ui和react原生创建内联facepile
EN

Stack Overflow用户
提问于 2017-01-12 00:57:58
回答 1查看 400关注 0票数 0

如何在shoutem/ui中创建内联图像行?现在,它们显示为块元素,每个元素都有自己的行。相反,我想将它们显示为一排居中的头像图像。

http://shoutem.github.io/docs/ui-toolkit/components/image

代码语言:javascript
复制
<Tile>
  <Parallax driver={this.driver} scrollSpeed={1.2}>

    <Title styleName="md-gutter-top">{post.name}</Title>
    <Caption>{post.title}</Caption>
    <View>
      <Image
        styleName="small-avatar"
        source={{ uri: 'http://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
      />
      <Image
        styleName="small-avatar"
        source={{ uri: 'http://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
      />
      <Image
        styleName="small-avatar"
        source={{ uri: 'http://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
      />
      <Image
        styleName="small-avatar"
        source={{ uri: 'http://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
      />
    </View>

  </Parallax>
</Tile>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-01-14 22:32:57

所以我只需要看看shoutem包含的默认样式作为视图的一部分。https://shoutem.github.io/docs/ui-toolkit/components/view

在这种情况下

<View styleName="horizontal">

所以就像这样

代码语言:javascript
复制
 <View styleName="horizontal">
      <Image
        styleName="small-avatar"
        source={{ uri: 'http://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
      />
      <Image
        styleName="small-avatar"
        source={{ uri: 'http://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
      />
      <Image
        styleName="small-avatar"
        source={{ uri: 'http://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
      />
      <Image
        styleName="small-avatar"
        source={{ uri: 'http://shoutem.github.io/img/ui-toolkit/examples/image-3.png'}}
      />
    </View>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41596514

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档