6

ScreenShot http://dl.dropbox.com/u/33331786/swipedemo.png

I would like to know how to setup the animation where, for in example in the latest Twitter for Android App, you can swipe a tweet to the side, and a quick menu will appear(not the old popup one). Thanks..

Adil Soomro
  • 37,609
  • 9
  • 103
  • 153
borislemke
  • 8,446
  • 5
  • 41
  • 54
  • I think you have to implement GestureListener on your ListView item on intercept for swipe action to implement such functionality, I hope this might work – ingsaurabh Sep 13 '11 at 07:37
  • Would you mind to show me an example of it implemented? Just think of this, there is a listview of textviews. If one of the textviews is swiped to left/right, it leaves screen and reveal a layout/activity BELOW the textview. I will post a pic to make this a bit clearer. – borislemke Sep 15 '11 at 07:39

1 Answers1

16

Since this is a really cool feature and I didn't find an implementation for that I created it myself. I started a project which will contain this feature (besides other dev tools).

Update:

The project has moved to GitHub (android-toolbox)

The project contains that feature and meanwhile has some good bugfixes since I used it in another app. The feature is called swipeable quick action.

There's a showcase application which demonstrates it and shows you what the code looks like. For quick starters there's an APK file in the download section so you can see what it it is without have to read everything you find in the project wiki.

If you want to see this feature in a real application you can check my banshee-remote project (screenshots). The application itself is interesting only when your using Banshee as your favorite music player.

Critic, requests, bug reports or any kind of feedback is very welcome! I'll respond to every message ;-)

Knickedi
  • 8,742
  • 3
  • 43
  • 45
  • Hi Knickedi, do you have any sample code that runs your Swipeable Quick Action? – Billy Sep 27 '11 at 04:32
  • @Knickedi do you think SwipeableListView will work correctly, if i put it inside a viewPager? my goal is: The list is inside a viewpager with 2 views. If the user swipes up/down, the list is scrolled. If the user swipes right, then the swipe is performed on an element. If the user swipes left, then the viewpager brings in the screen to the right. – sydd Dec 06 '11 at 04:11
  • @sydd Currently there's no chance to make that work. You could let the list react on (long) clicks so it performs a swipe but you can't swipe it with the finger. But I'm working on that. I'll post my results when I make progress. – Knickedi Dec 07 '11 at 18:49
  • @sydd I'm not sure what you're trying to do will work since the viewpager and the SwipeableListView both implement a swipe gestures across the screen. How would you differentiate both swipes ? – hayonj Nov 02 '13 at 09:33