gesture

Vertical ViewPager and Android Pie Inconsistent Behavior with Swipe Gesture

核能气质少年 提交于 2019-11-28 23:42:37
问题 My problem is closely related to two other questions that haven't been answered yet. ViewPager not responding to touch in layout area created dynamically in Fragment https://stackoverflow.com/questions/53469581/problem-with-vertical-viewpager-like-inshorts My Vertical ViewPager works wonderfully and consistently within any device I have tested and with any OS 5 - 8. I recently upgraded a pixel 2XL with Android Pie and now my Vertical ViewPager appears to be unresponsive, then works, then it

UINavigationController Interactive Pop Gesture Not Working?

跟風遠走 提交于 2019-11-28 19:14:27
So I have a navigation controller in my built for iOS 7 app. The titleView is visible, as well as the back button and navigation bar its self. For some reason, the interactive pop gesture (swipe from the left edge) isn't working. Nothing happens. When I log the gesture, it is not nil. Is there anything special I have to do to enable this functionality? What could cause it not to work? I have found that when using custom back buttons, the interactive pop gesture stops working (my take is that Apple cannot foresee how your custom back button will behave, so they disable the gesture). To fix this

How to mimic two-finger scroll/drag gesture on ios simulator?

你说的曾经没有我的故事 提交于 2019-11-28 16:49:21
I have a scroll page that I specified two fingers minimum. It works on my device, but don't know how to mimic this gesture on Simulator. I can mimic one-finger scroll without problem. I've tried option/ctrl/shift etc, but couldn't get it work. Maybe my combination is wrong. Anyone knows how? Thanks. Joe C Holding the "Alt/Option" key and dragging simulates multi-touch pinch-to-zoom. Holding "Alt/Option + Shift" and dragging simulates multi-touch scrolling. There is a nice table with all the supported gestures in the iOS Simulator User Guide from Apple. Here is the extract for the two-finger

Problems with gesture recognizer in iOS 7

梦想的初衷 提交于 2019-11-28 16:14:12
I'm adding several UIView objects (e.g. 5) to the screen, one inside the other. This, for example, view5.superview = view4 , view4.superview = view3 , view3.superview=view2 , view2.superview = view1 . For all these UIView I set uitapgesturerecognizer; for view1-4 I just do NSLog(@"tap %@", self) in callback, while for view5 tap I set the following: delete view4 from the hierarchy, then put the same object view4' at the same place of the hierarchy. This object also contains view5' for which UITapGestureRecognizer is set (practically, I replace one part of markup with similar one). Then I start

Animate the keyboard in sync with the UIView while edge-swiping back in iOS7

你。 提交于 2019-11-28 16:00:46
I'd like to get the behavior similar to Messages app (also common in most texting apps) in iOS7, where in a conversation view swiping right from the left edge of the screen would behave like the back button in a UINavigationController. I have managed to implement this behavior, however, if the keyboard is open in the presenting view, when I start swiping back, the keyboard gets stuck and does not animate with the view to the right as I move my finger. I'd like to animate keyboard and the presenting view as one unit, not as if keyboard is on top of the other views and they are animating behind

SwipeRefreshLayout + ViewPager, limit horizontal scroll only?

这一生的挚爱 提交于 2019-11-28 13:23:16
问题 I've implemented SwipeRefreshLayout and ViewPager in my app but there is a big trouble: whenever I'm going to swipe left / right to switch between pages the scrolling is too sensitive. A little swipe down will trigger the SwipeRefreshLayout refresh too. I want to set a limit to when horizontal swipe starts, then force horizontal only until swiping is over. In other words, I want to cancel vertical swipping when finger is moving horizontally. This problem only occurs on ViewPager , if I swipe

Is there a way to trigger gesture events on Mac OS X?

☆樱花仙子☆ 提交于 2019-11-28 09:23:42
I want to trigger multitouch gesture events on Mac OS X. Is there a way to do this? Mouse or keyboard events can be triggered with CGEventCreateMouseEvent and CGEventCreateKeyboardEvent. Is there similar low level function for multitouch events? Rok Your suggestion is not working. I've tried this code: - (void)rotateWithEvent:(NSEvent *)event { NSLog(@"ROTATE"); } -(IBAction)button:(id)sender { CGEventSourceRef eventSource = CGEventSourceCreate(kCGEventSourceStateCombinedSessionState); CGEventRef event = CGEventCreate(eventSource); CGEventSetType(event, NSEventTypeRotate); CGEventPost

How to make long press gesture in Xamarin Forms?

老子叫甜甜 提交于 2019-11-28 09:20:56
Could you please let me know how can I recognize long press gesture in Xamarin Forms application? A few days before I used TapGestureRecognizer TapGestureRecognizer imageTap = new TapGestureRecognizer(); imageTap.Tapped += (sender, args) => this.OnClickImage; image.GestureRecognizers.Add(imageTap); But I don't know how to make long press gesture according to this thread from xamarin forum It should looks something like this, but it does not work. var dumpParam = new RelayGesture((g, x) => DisplayAlert("Title", "Hello message", "Cancel")); book.Cover.SetValue(Gestures.InterestsProperty, new

How to use swipe gesture in a view pager's page with android?

那年仲夏 提交于 2019-11-28 08:49:27
I need to take a view pager in an application which consist of three pages. I am new to android view pager. I have one view named TestSwipingView in second half of the screen and another view for the top half of the screen. How do I configure only TestSwipingView as swipe-able? This is how I implemented it. It may give you some idea too. Step 1 : In my main activity, I have made my page adapter and called it in onCreate(). public class SomeActivity extends FragmentActivity { WebView mWebView; private boolean mFromDropdown = false; @Override protected void onCreate(Bundle savedInstanceState) {

Passing MotionEvents from RecyclerView.OnItemTouchListener to GestureDetectorCompat

人走茶凉 提交于 2019-11-28 07:53:32
I have a Fragment that implemets RecyclerView.OnItemTouchListener. How do I pass click and long-click motion events only from the RecyclerView to the GestureDetectorCompat. That is I mean I only want to handle clicks and long-clicks, rest of the events should be handled by the RecyclerView as it would happen normally. How can I set this up? public class MyFragment extends Fragment implements RecyclerView.OnItemTouchListener, GestureDetector.OnGestureListener { protected RecyclerView recyclerView; protected RecyclerView.Adapter adapter; protected LinearLayoutManager layoutManager; private