Image NativeScript在动态网格中显示图像
我正试图找到一种方法,在两列三行中显示6幅图像。 与列和图像的比例应为50%。这是我的代码,它不会“溢出”第二行和第三行Image NativeScript在动态网格中显示图像,image,listview,gallery,nativescript,stackview,Image,Listview,Gallery,Nativescript,Stackview,我正试图找到一种方法,在两列三行中显示6幅图像。 与列和图像的比例应为50%。这是我的代码,它不会“溢出”第二行和第三行 <Repeater items="{{ sviKatalozi }}"> <Repeater.itemsLayout> <StackLayout orientation="horizontal" width="500" height="1000" /> </Repeater.it
<Repeater items="{{ sviKatalozi }}">
<Repeater.itemsLayout>
<StackLayout orientation="horizontal" width="500" height="1000" />
</Repeater.itemsLayout>
<Repeater.itemTemplate>
<Image width="180" margin="10" src="{{ 'http://imageurl' + katalog_image }}" />
</Repeater.itemTemplate>
</Repeater>
有什么办法可以让这一切顺利进行吗?谢谢你像这样使用NGP
<GridLayout *ngFor="let item of placesArray" width="50%" class="placeBox">
代替Repeater你能添加游乐场演示链接吗?最好也显示你的组件代码,即对于'sviKatalozi'嗨,这里是一个例子,它不是Repeater,因为我现在有ListView,但同样的东西。我想像这样订购,谢谢回复,我没有使用Angular NativieScript,所以*ngFor不起作用。
<GridLayout *ngFor="let item of placesArray" width="50%" class="placeBox">