MyException - 我的异常网
当前位置:我的异常网» Android » listview点击item动画效果

listview点击item动画效果(3)

www.myexceptions.net  网友分享于:2013-04-10  浏览:579次

                        return arg1;
                } 

listView的点击监听事件如下,写在oncreate()里,在这里定义了点击项动画:
listView.setOnItemClickListener(new OnItemClickListener(){

                        @Override
                        public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
                                        long arg3) {                
                                orienIndex=arg2-FIXMUSICINDEX;                                
                                updatemusiclist();
                                
                                if(orienIndex>0)
                                        arg0.startAnimation(textup);
                                else if(orienIndex<0)
                                        arg0.startAnimation(textdown);
                                clickflag=1;
                                listView.clearAnimation();
                                listView.getChildAt(currIndex).startAnimation(tbig);
                                if(clickflag==1){
                                        listView.getChildAt(recordpreviousindex).startAnimation(tsmall);

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有