Forum Xamarin.Android

Swipe item in listview

Has anyone implemented or know of an example of swiping right or left a list view item for xamarin android similar to the gmail app?


  • ChristianGillChristianGill DEMember ✭✭

    Same issue here.
    I have a Listview. Several Items can be scrolled with up/down. Now i want to start an action if the user make a swipe left or right on the ListviewItem.
    Like the delete swipe in gmail. (Showing a context menu what to do with the listviewitem ...)
    At the moment i can only connect the click and the Longclick event.
    Is there an easy solution for this problem ?

  • CortezCortez USMember ✭✭✭

    Hell Guys!

    We talked about this issue here:

    I had a working example.

  • chris_riesgochris_riesgo USUniversity ✭✭✭
    edited June 2014

    I'm working on a C# port of the 47 Degrees SwipeListView. I considered making a simple binding project & component, but there are some enhancements that I think can be made.

  • chris_riesgochris_riesgo USUniversity ✭✭✭

    Here's the C# SwipeListView control that I've started porting from 47 Degrees:

  • @chris_riesgo‌ nice work , how do you include in the C# android project ?

  • chris_riesgochris_riesgo USUniversity ✭✭✭

    @DereckEminenceLombela‌ - Thanks, Dereck. Including this control into your existing project might take some manual copying of files, so instead, I'd recommend one of a few things:

    1. Clone the GitHub repo, then include the entire project in your existing solution, adding a reference to the SwipeListView project from your Android project.
    2. Clone the GitHub repo, open the SwipeListView project on its own, build the project in Release mode (generating a DLL), then add a reference to that DLL in your Android project.
    3. Wait for me to turn it into a Xamarin Component that you can add from the Component Store :)

    I'll try to post a better description on how to actually use the control on GitHub, but until then if you have specific questions, I'll try to answer them.

  • @chris_riesgo‌ Thanks for your recommendation , i just started a project 2 days ago and i have not implemented the screen that need to use SwipeListView as yet , probably by saturday i will try to integrate it using one of your recommendations and will see how it works out. If i do have specific questions i wont hesitate to ask them.


  • Matt.CookMatt.Cook USMember ✭✭

    Hey @chris_riesgo‌, thanks for making the SwipeListView project. I was wondering if you made any progress on making it a Xamarin Component? If not, do you have a recommendation of the better choice to do of the options you gave to add it to the project?

  • chris_riesgochris_riesgo USUniversity ✭✭✭

    @Matt.Cook - I haven't been able to create the component yet. Just got back from my honeymoon :)

    The best choice is really up to your preference. If you use 1), then anytime I update the repo, you can pull and get the changes all part of building your project. If you use 2), you don't have to worry about the overhead of having an "unrelated" project stuffed inside of your own solution.

    I'm going to try working on the component this next week, but it takes time to submit the component and receive approval. Hopefully in the next few weeks it will be available as a component.

  • TargusSignityTargusSignity INMember

    Guys I have done swipe list item functionality and Its working pretty good. all list item able to swipe but during this process I'm not able to hit OnListItemClcik event.

    any idea?

  • ankita.1421ankita.1421 USMember

    Hi @chris_riesgo‌.. I need to implement the similar listview with menus on swiping list item, as discussed above. Is Xamarin component you were working on for the same available now ?

  • chris_riesgochris_riesgo USUniversity ✭✭✭

    @anika.1421 - I was working on finishing this component this morning, but the java project has some changes that I'd like to include before I submit the component tonight.

  • chris_riesgochris_riesgo USUniversity ✭✭✭

    I submitted my component for review tonight. It's a port of the 47 Degrees SwipeListView control. Hopefully the component will be available within a few days if not sooner.

  • chris_riesgochris_riesgo USUniversity ✭✭✭

    The component was just approved. Hope it works for you!

    Android SwipeListView

  • laygrlaygr MXMember, University

    @chris_riesgo, thanks a lot! I'm about to use it. I hope to give it 5 stars.

  • caitlintcaitlint USMember

    I know you posted this a long time ago, so it is very likely you don't need it any more, but now Xamarin Forms has a built in swipe to delete feature, and in Xamarin 1.4 They will have a swipe down to refresh feature added.

  • I use this component for a while and it works really well, but the customer recently asked for a swipeable list with header. Basically group list items with date and above the first item of each date show the date. Is this possible with this component? What if i add the header in listitems axml and make it invisible in getView when i need to?

  • Hi. I need to know if 47 Degrees SwipeListView works for xamarin forms?

    I need to swipe on a listview item and show 3 side buttons, any example?


  • AndreiMisiukevich_AndreiMisiukevich_ USMember ✭✭✭✭✭

    You can use it this package (and customize your context buttons as you wish)

  • PrayagPrayag Member

    @AndreiMisiukevich_ said:
    You can use it this package (and customize your context buttons as you wish)

    This solution works well for IOS not in android.

  • AndreiMisiukevich_AndreiMisiukevich_ USMember ✭✭✭✭✭

    @Prayag unfortunately yes. There is Xamarin.Forms bug, which causes a crash.

Sign In or Register to comment.