swipe-gesture

Swipe ListView item From right to left show delete button

本小妞迷上赌 提交于 2019-12-17 21:26:11
问题 I have a custom ListView showing the list of words selecting from database. When I swipe this listview item i want to show Delete button like image below. And when I press that button it is deleted from Database and refresh the listview. m I already look in this sample code here. But it still does not work. 回答1: EDIT: between other options there's a nice library that could solve your issue: https://github.com/daimajia/AndroidSwipeLayout 回答2: i've searched google a lot and find the best suited

adding touch listener for liner layout filled with buttons

断了今生、忘了曾经 提交于 2019-12-17 18:31:52
问题 I added a touch event to a linear layout to respond to swipe gestures, and it works well. However, when i add buttons to the layout, the parent liner layout is ignored. How should I prevent this from happening? LinearLayout ln2 = (LinearLayout) findViewById(R.id.fr2); ln2.setOnTouchListener(swipe); How to i use onInterceptTouch ? 回答1: You should create your own layout and override onInterceptTouchEvent(MotionEvent ev) method of your layout. For Example I created my own layout which extends

How to disable swipes in a view pager in android

ⅰ亾dé卋堺 提交于 2019-12-13 09:16:33
问题 I am new to android. I am creating an app which consists of a view pager with a swipe tab layout. When I click the button it does some calculations inside of the view pager. While it's doing this I want the switching between the tabs to be disabled. So no swiping between the pages while it's calculating. After the calculations are completed I want the switching to be enabled again. Can anyone tell me how to do this please? Thanks in advance. I tried this. Please have a look at it: public

UITapGestureRecognizer causes app to crash

安稳与你 提交于 2019-12-11 09:38:48
问题 UITapGestureRecognizer causes app to crash when a swipe is done. Swipes done over very short distances do not cause any problems, but those done over a longer distance give the error : -[UITapRecognizer name]: unrecognized selector sent to instance 0x17ee27c0 where 0x17ee27c0 is a random value. *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITapRecognizer name]: unrecognized selector sent to instance 0x17ee27c0' *** First throw call stack: (0x2cb7dc1f

swipe menu for expandable listview

孤者浪人 提交于 2019-12-10 18:03:48
问题 I want to create swipe menu for expandable listview. Something like this. I'm using Android studio and not sure about how to add this as dependencies in Gradle. Or should I go with the other libraries. I'm very new to the Android so any suggestion would be helpful. Can we also achieve that, without using any library? Thanks! 来源: https://stackoverflow.com/questions/36330126/swipe-menu-for-expandable-listview

programmatically simulate a swipe gesture in Swift

走远了吗. 提交于 2019-12-10 14:52:01
问题 I am implementing a gesture recognizer for swiping in Swift. I wan to be able to simulate the flinging of the card (programmatically swipe the view). I assumed there would be a built in function for this but all I have found is one for tap gesture not swipe gesture. This is how I am implementing the swipe gesturing: let gesture = UIPanGestureRecognizer(target: self, action: Selector("wasDragged:")) cardView.addGestureRecognizer(gesture) cardView.userInteractionEnabled = true } func wasDragged

Are there open source gesture libraries in Android? [closed]

放肆的年华 提交于 2019-12-10 04:13:34
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have defined my own gestures in an Android app. Is this the only way to define gestures? Are there any standard opensource libraries which will already have the gesture's raw file? 回答1: I have been developing a library to support basic 1 nad 2 finger gestures on Android with a very very simple drop in

jQuery (Swipe vs. Touch) pageX and pageY keep returning 0

大兔子大兔子 提交于 2019-12-08 23:03:17
问题 I'm playing with touchstart and touchend events on my iPhone. I built a sample page that has div that if you touch it and scroll the page, it should return the y coordinates of the start and end positions. link: http://jsbin.com/ibemom/2 the jQuery: var touchStartPos; $('.theDiv') .bind('touchstart', function(e){ touchStartPos = e.pageY; }) .bind('touchend', function(e){ alert(touchStartPos + ' | ' + e.pageY) }) When I load that page on my iPhone, however, the alert keeps reporting both

Swipe Gesture applied at Fragment level along with ViewPager with it's default swipe disabled

有些话、适合烂在心里 提交于 2019-12-07 01:19:53
问题 I found the question below: Android: FragmentActivity in FragmentActivity (Scrollview in Navigationbar) . However this question of mine is about how to use Transactions to show fragments as well as enabling swipe gesture detection in a safe way. Note: There is a link in the answer that I have posted (This also have the effective way of showing fragments in a container using transactions, including two scenarios). Please see that. I have tried a few things in regards, but by using a fragment

Android: Swipe left to right and right to left

你。 提交于 2019-12-06 16:28:21
问题 I am new to Android, and I am trying to make a page where I can swipe from left to right and right to left to go to previous and next pages. I spent a lot of time looking up and trying different things. For some reason, when I swipe (no matter which direction), it only shows next picture. It should have shown me previous picture when I swipe right to left. Any help will be highly appreciated! Thanks so much for your time :) public class MyGestureDetector extends SimpleOnGestureListener {