我有图片构件包含1-10张图片可以滑动。我知道当我对屏幕进行条纹扫描时,图像会从左向右滚动。我想自动循环图库10自动启动后的第一个图像,有没有自动圆形适配器或方式?Android自动循环图库
final Gallery g = (Gallery) findViewById(R.id.gallery);
g.setAdapter(new ImageAdapter(this));
Animation animation = AnimationUtils.loadAnimation(this,
R.anim.rotate_indefinitely);
animation.getInterpolator();
animation.setDuration(1000);
animation.setStartOffset(200);
animation.setRepeatMode(2);
animation.setFillAfter(false);
animation.setFillEnabled(true);
g.setAnimation(animation);
g.startAnimation(animation);
,但我只看到第一幅图像动画..
看看我的Video ...
你想要一个无尽的画廊,从滚动到最后的第一项开始,对吧?因此,您认为它包含的物品多于当前物品,并在Adapter的getView()中添加位置%= itemsCount,以使其在最后一个物品之后排列第一个物品。 – ognian 2010-06-25 11:06:01