¡@

Home 

2014/10/16 ¤W¤È 08:12:40

android Programming Glossary: downxvalue

Developing an Android Homescreen

http://stackoverflow.com/questions/3467461/developing-an-android-homescreen

OnTouchListener private ViewFlipper vf private float downXValue private View view1 view2 view3 @Override public void onCreate.. switch arg1.getAction case MotionEvent.ACTION_DOWN this.downXValue arg1.getX break case MotionEvent.ACTION_UP float currentX.. case MotionEvent.ACTION_UP float currentX arg1.getX if downXValue currentX if currentView view3 float t3 320 currentX downXValue..

Developing an Android Homescreen

http://stackoverflow.com/questions/3467461/developing-an-android-homescreen

is my code public class MainActivity extends Activity implements OnTouchListener private ViewFlipper vf private float downXValue private View view1 view2 view3 @Override public void onCreate Bundle savedInstanceState super.onCreate savedInstanceState.. view2 rightView view1 else leftView null rightView null switch arg1.getAction case MotionEvent.ACTION_DOWN this.downXValue arg1.getX break case MotionEvent.ACTION_UP float currentX arg1.getX if downXValue currentX if currentView view3 float.. MotionEvent.ACTION_DOWN this.downXValue arg1.getX break case MotionEvent.ACTION_UP float currentX arg1.getX if downXValue currentX if currentView view3 float t3 320 currentX downXValue 320 this.vf.setInAnimation AnimationHelper.inFromLeftAnimation..