我的图库小部件包含 1-10 张要滑动的图像。我知道当我在屏幕上进行条纹时,图像从左向右滚动。我想要自动循环图库在 10 后自动从第一张图像开始,有没有自动循环适配器或方法???
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 http://vimeo.com/12817335 ...
为 Gallery 编写一个 SpinnerAdapter,在其 getCount() 方法中返回 Integer.MAX_VALUE。然后,当在 getDropDownView() 和 getView() 中返回 View 时,将实际项目数的模应用于position
争论。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)