开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜