我创建了一个应用程序,我有一个listview,所以现在我正在努力实现三星的sdk来管理空中手势和它的工作正常,因为应用程序识别我滑动时没有触摸屏幕,但是我想做的是当用户做手势时实现滚动up
和raw_record = LOAD '$inputPath' -- USING com.test.parser.TestParser;
record_project = FOREACH raw_record GENERATE
field1,
field2,
field3,
field4;
sl_record = FILTER record_project BY (field1=='1' OR field1=='2');
split sl_record into rec1 if field1=='1',rec2 if field1=='2';
rec2Sample = SAMPLE rec2 $samplingRate;
finalRec1 = FOREACH rec1 GENERATE
-1 as label1,
1 as label2,
field1 as label3,
field2 as label4,
field3 as label5,
field4 as label6;
finalRec2 = FOREACH rec2 GENERATE
-1 as label1,
1 as label2,
field1 as label3,
field2 as label4,
field3 as label5,
field4 as label6;
unionRec = UNION finalRec1, finalRec2;
unionRecWithId = FOREACH unionRec GENERATE label1, label2, label3, label4, label5, label6,(chararray)RANDOM() AS id;
mixedRec = ORDER unionRecWithId by id ASC;
STORE mixedRec INTO '$outputPath' USING PigStorage(',');
。所以我的问题是我怎么能对我的应用程序向上或向下滚动?应该是模仿用户按下屏幕并滚动
答案 0 :(得分:0)
在ListView中你可以使用smoothScrollToPositionFromTop或smoothScrollBy方法