Android TextView Linkify intercepts with parent View gestures

Linkify applies to a movementMethod to the textView LinkMovementMethod. That movement method thought it implements a scrolling vertically method it overrides any other scrolling method the parent has. Although touchEvent can be dispached to the parent, the specific parent ScrollView needed the whole sequence ACTION_DOWN , ACTION_MOVE, ACTION_UP to perform (sweep detection). So the solution … Read more

Fling Gesture and Webview in Android

Create a GestureListener and a GestureDetector. Call the GestureDetector.onTouchEvent by overriding the webview’s onTouchEvent. You can also just override the Activity onTouchEvent btw. I can post some code if you need. Edit: Code as requested. public class Main extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) … Read more

how to implement both ontouch and also onfling in a same listview?

Pseudo code answer to clarify the above comments. How to have the MySimpleGestureListener’s onTouch method called. public class GestureExample extends Activity { protected MyGestureListener myGestureListener; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); myGestureListener = new MyGestureListener(this); // or if you have already created a Gesture Detector. // myGestureListener = new MyGestureListener(this, getExistingGestureDetector()); // Example of … Read more

How to make long press gesture in Xamarin Forms?

You can do it cross platform way by attaching the below behavior, as long as it is Xamarin.Forms.Button or a sub-type of it. using System; using System.Threading; using System.Windows.Input; using Xamarin.Forms; namespace App.Controls.Behaviors { public class LongPressBehavior : Behavior<Button> { private readonly object _syncObject = new object(); private const int Duration = 1000; //timer to … Read more

How to generate zoom/pinch gesture for testing for Android

well, i have found the issue. ISSUE: When using the obtain() API, we have to set the pressure and size of the points in each event. For obtain(long, long, int, int, android.view.MotionEvent.PointerProperties[], android.view.MotionEvent.PointerCoords[], int, int, float, float, int, int, int, int) the PointerCoords[], we have to set the pressure and size to 1, the default … Read more