1

in my app when an activity is opened i am have a edit boxes to be filled. When the user fills the edit box, a default music will be played in background. If the user wants to select another song, he can select a song from a list view which shows all the song stored in sd card.

Now i want to show the list view when the user swipe's the screen to left.

I have already written the code for my edit boxes and list of songs separately and they are working good. Now i want to swipe between those activities.

please help me....

Siva K
  • 4,968
  • 14
  • 82
  • 161

2 Answers2

2

Have you seen Fling gesture detection on grid layout

Also note that you'll probably want to swipe between Views, not Activities

Community
  • 1
  • 1
Andrew Flynn
  • 1,501
  • 12
  • 17
1

I maintain a project that uses swipe actions a lot.

It is open-source, feel free to copy-paste the code: https://github.com/ankidroid/Anki-Android

Especially this class:
https://github.com/ankidroid/Anki-Android/blob/dbbf3ea6549e82dee9e3c0df39bb5c3f74d3e189/AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java

Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373