Tunous / SwipeActionView

Android swipe-able view, which allows users to perform actions with swipe gestures.
Apache License 2.0
198 stars 17 forks source link

How can i swipe the view programmatically? #14

Closed lvaizer closed 5 years ago

lvaizer commented 5 years ago

I want to show the user for the first time that the view is swipeable, how can i do that?

Tunous commented 5 years ago

This is not possible currently. A potential solution has been mentioned in https://github.com/Tunous/SwipeActionView/issues/11#issuecomment-327202307 (which could also have parameter specifying whether it should be animated) but it was never implemented. I can't promise when I could add that feature but I'm open to pull requests.

lvaizer commented 5 years ago

Thanks, i cant create pull request, access denied.. That's what i have added to SwipeActionView class: ` /**

Tunous commented 5 years ago

Thanks, i cant create pull request, access denied..

This could happen if you tried to push changes to my repository instead of your own fork. Generally to be able to submit pull requests you first have to fork the repository and then create a pull request with a branch from your fork. You can learn more about creating pull requests here


Anyway, I've created a pull request which implements suggested feature based on your code snipped. If you want you can test it before next version is released by using a snapshot pointing to the pull request branch:

implementation 'com.github.Tunous:SwipeActionView:feature~swipe-from-code-SNAPSHOT'

If you test it please let me know if what I implemented works for you.