android开发手势翻页操作的效果

private void init(Context mContext) {
gestureDetector = new GestureDetector(this,this);
flipper = (ViewFlipper)findViewById(R.id.flipper);

//添加图片
flipper.addView(setImages(R.drawable.a001));
flipper.addView(setImages(R.drawable.a002));
flipper.addView(setImages(R.drawable.a003));
flipper.addView(setImages(R.drawable.a004));
flipper.addView(setImages(R.drawable.a005));

//创建动画
animation[0] = AnimationUtils.loadAnimation(mContext,R.anim.left_in);
animation[1] = AnimationUtils.loadAnimation(mContext,R.anim.left_out);
animation[2] = AnimationUtils.loadAnimation(mContext,R.anim.reghit_in);
animation[3] = AnimationUtils.loadAnimation(mContext,R.anim.reghit_out);

 
Copyright © 2008-2021 lanxinbase.com Rights Reserved. | 粤ICP备14086738号-3 |