我正在使用React Native的#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
char ChannelNo[2]; // "P1"
unsigned int ChannelPin; // 23
char State; // 'o'
} test;
typedef struct {
test One[2];
test two[2];
test three[2];
test four[2];
test five;
test six[1];
} matrix;
matrix matrix1[] = {{ {{{"P4",2,'O'},{"P4",1,'O'},{"Z",0,'Z'}},
{{"P4",4,'O'},{"P4",3,'O'},{"P4",5,'O'}},
{{"0",0,'0'},{"0",0,'0'},{"0",0,'0'}},
{{"0",0,'0'},{"0",0,'0'},{"0",0,'0'}},
{{"0",0,'0'}},
{{"P1",49,'S'},{"P1",1,'G'}} },
{ {{"P4",2,'O'},{"P4",1,'O'},{"Z",0,'Z'}},
{{"P4",4,'O'},{"P4",3,'O'},{"P4",5,'O'}},
{{"0",0,'0'},{"0",0,'0'},{"0",0,'0'}},
{{"0",0,'0'},{"0",0,'0'},{"0",0,'0'}},
{{"0",0,'0'}},
{{"P1",49,'S'},{"P1",1,'G'}} } }
int main() {
printf("%d\n",matrix1[1].One[0].ChannelPin);
return 0;
}
来显示每行3张图像,就像Instagram一样。但是,最后一行的最后一张图片,由于屏幕高度限制而最初显示为一半,有时在我向下滚动之前无法显示。
相关代码:
<ListView>
如何解决此问题?猫图像每张不到20KB,它通过Expo App在iPhone 7 Plus上运行,因此内存应该不是问题。