Dalton Metzler
Dalton Metzler

Reputation: 13

Android Swipe Finger

Please look at this picture

gesture

Basically you swipe your finger down in that area and it shows more.. how can i do this?

Upvotes: 0

Views: 463

Answers (1)

Nikola Despotoski
Nikola Despotoski

Reputation: 50538

With ViewFlipper or (horizontal)ListView , each page/item of the ViewFlipper/ListView will contain one of these view (I bet they are images). For swiping you can implement``onTouchListener or GestureDetector. Override onFling() method, and measure the distance between the initial X-coordinate when the user touches the screen and the final x-coordinate when the user releases the touch screen with method event1.getX() and event2.getX(). Do not measure the motion on the y-axis since --->(to right, you have motion only on the x-axis). Intialize some MINIMUM_DISTANCE to compare with the result from difference between the first touch and release touch coordinate (event1.getX() - event2.getX()).

Upvotes: 1

Related Questions