10

I'm starting with Android development and I was trying to create a ListView item that acts like this image:

target for Android ListView.

On the last step the user can click on "more" or "delete" and the other view will stay there like the last step, and the user will be able to swipe right to put the view back at the place

I have already tried using some tutorials about swipe to dismiss but I couldn't get this done. Does anyone know any framework or some way to do this?

tvaamorim
  • 143
  • 1
  • 2
  • 10
  • 1
    so you want to have buttons when you swipe the list?? – Maulik Sheth Oct 15 '13 at 22:10
  • Can you point to some tutorials that you have tried or post some code that shows an attempt at what you're trying to achieve or at least offers some context that answers can go forward from? – Thomas Upton Oct 15 '13 at 22:29
  • @MaulikSheth Yes, and when it reach the limit or the half way it will stuck like the last image and wait the user to click in some button, and if the user swipe right it will cover again the buttons. – tvaamorim Oct 15 '13 at 23:08
  • @ThomasUpton i'm looking for the post i was looking and i will post here. – tvaamorim Oct 15 '13 at 23:09
  • @ThomasUpton here: http://stackoverflow.com/a/13312058/2884276 – tvaamorim Oct 15 '13 at 23:11
  • There is a library on github that slides listview to show buttons or what you need, I dont remember the name maybe its swipeable listview – Maulik Sheth Oct 16 '13 at 06:37
  • @MaulikSheth this-> https://github.com/47deg/android-swipelistview ?? i have tried this but i think i`m doing something wrong, i already use another libraries on my project using the jar files but after a add this library to my project, it do no generate de R files any more, do you know what i`m doing wrong? Thanks – tvaamorim Oct 16 '13 at 12:06
  • hi after using your this library did you add nine old android jar ? its mentioned in its description _SwipeListView depends on the following libraries. com.nineoldandroids_ – Maulik Sheth Oct 16 '13 at 12:48
  • get it from here https://github.com/JakeWharton/NineOldAndroids this is used for animations which 47deg uses. – Maulik Sheth Oct 16 '13 at 12:49
  • I have no solution but an advice for you. User could able to swap in 2 ways. Right to left for delete action and left to right for more. There is already some examples for 2 way sliding list view. I think you are going to create iOS style mail app. So you need exactly that feature. Good luck there. – Emre Aktürk Oct 16 '13 at 13:05
  • @MaulikSheth yes i'm already using NineOldAndroids. – tvaamorim Oct 16 '13 at 15:13
  • @EmreAktürk thanks for the idea, but i don't want to dismiss i only want to slide and opne until it can show both buttons. – tvaamorim Oct 16 '13 at 15:14

2 Answers2

7

Try to implement 47degree Android-SwipeListView. This is perfect fit for your requirement.

Library URL:

https://github.com/47deg/android-swipelistview

Full Fledge Working Example:

https://play.google.com/store/apps/details?id=com.fortysevendeg.android.swipelistview

This is best ever listview extension i have found so far!! And I am sure you too will like it...

GDroid
  • 1,254
  • 1
  • 16
  • 36
5

Check out SwipeMenuListView

It looks a lot more like the Swipe-able TableViews in iOS:

SwipeMenuListView SwipeMenuListView SwipeMenuListView

Sheharyar
  • 73,588
  • 21
  • 168
  • 215