Gallery Selected Position Animation
am trying to use this myGallery.setSelection(5, true);
(Gallery.setSelection(Position, Animate);), which 5 is the requested position.
should this method animate the gallery till th开发者_StackOverflow中文版e new selected position is shown?? or just jumps to the selected position directly?
because when i use it, no animation happens !!
set animation for on item selected listener. The animation will call only for selected gallery item.
myGallery.setOnItemSelectedListener(new OnItemSelectedListener(){
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1,int arg2, long arg3) {
arg1.setAnimation(AnimationUtils.loadAnimation(this, R.anim.scale_img));
}
});
this will help you.
精彩评论