gesture

Touch is not detected within child Fragment

人走茶凉 提交于 2019-12-11 03:53:14
问题 I am having an issue with onTouchListener when I attach the listener to a child fragment of a fragment. I tried many other solutions but it seems the listener ain't working. The GestureDetector code is taken from here: Fling gesture detection on grid layout main_activity.xml <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/home_drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent"> <!-- The

How to disable Opera mouse gestures?

一世执手 提交于 2019-12-11 02:58:34
问题 I'm working on a browser game, where you use right click also. It works fine, but in Opera it's unplayable because of mouse gestures. How can I disable it on my website? 回答1: In the Menu: Tools > Preferences... (Ctrl+F12) Uncheck shortcut options in the Dialog: Advanced > Shortcuts > Enable mouse gestures Advanced > Shortcuts > Enable single-key shortcuts 来源: https://stackoverflow.com/questions/8520880/how-to-disable-opera-mouse-gestures

Passing scroll gesture to UIScrollView from another view

╄→гoц情女王★ 提交于 2019-12-10 14:22:44
问题 I do have a view that has a UIScrollView and over it there is a view that display some text. When the user swipes over this view that contains text the UIScrollView won't scroll. How to make this view transparent in a way it relays the swipe gesture to UIScrollView. Thanks 回答1: You can just set myTextView.userInteractionEnabled = NO; Or, if you're creating your view with Interface Builder, there's a check box there called 'User interaction enabled', just uncheck that. 回答2: Check out the

Detecting Swipe and Tap gestures

╄→尐↘猪︶ㄣ 提交于 2019-12-09 19:41:55
问题 How to detect Swipe and Tap in onTouch method? I want one of two actions to be executed when I swipe and other when I just tap. Need to know how to dell the difference between tap and swipe. Here is my code: @Override public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_MOVE) { mGestureDetector.onTouchEvent(event); } switch(event.getAction()) { case MotionEvent.ACTION_DOWN: x1 = event.getX(); y1 = event.getY(); break; case MotionEvent.ACTION_UP: x2 =

Are Android app widgets (for home screen) allowed gestures?

ⅰ亾dé卋堺 提交于 2019-12-09 16:28:21
问题 I noticed that when I swipe my finger from left to right across a home screen widget, in simulator on a AVD, Android switch to the left home screen. I was wondering if its possible to prevent this behavior and allow home screen gadgets to listen and react to finger gestures (like swipe)? Its very critical for my widget UI design. 回答1: Starting with API level 11 (Android 3.0.x) you can use " android.widget.RemoteViewsService.RemoteViewsFactory " and and assign a widget to use (from docs):

The Core iOS CookBook 第一章节学习笔记

风格不统一 提交于 2019-12-09 13:12:03
手势和触控基础知识 触摸控制 是 iOS 系统交互的核心方式。 触控 Cocoa Touch 以尽可能简单地方式实现了直接的操控。它会把触控事件发送给你正在进行交互的视图。 每一次触控都会转达很多的信息: 触控发生的位置,点击屏幕的次数,触控发生的时间。 iOS 使用 responder chain (响应链) 来确定究竟是哪个对象应该对触控做出响应。 响应者(responders)是响应 事件(event) 的对象。 这些响应者扮演的角色就好比是一串管理者,对这些 事件(event)进行管理。当用户触摸屏幕时,应用会去寻找一个对象来处理这一个触控事件。 触摸(touch)被传递下去,从一个视图到另外一个视图,直到一些对象来接管并且对这个 事件(event)做出响应。 在大多数情况下,触摸(touches)以及其信息 被存储在 UITouch 对象中,触摸(touches)被作为一组一组的形式在 UIEvent 对象中传递。每一个 UIEvent 对象都代表了一个单一的 触控事件,包含一次或多次触摸。这一点既决定了开发者如何去响应用户的操作,也决定了用户怎么在屏幕上进行操作。 你的应用通过 视图 或者 视图控制器 来接收 触摸(touches)。实现处理 触摸(touch)的类需要通过继承 UIResponder 类来实现。 你将会决定在哪儿处理和响应这些 触摸(touches)。

Using webcam to track hand gestures

我是研究僧i 提交于 2019-12-09 11:46:08
问题 I wanted to develop a program which uses the webcam to track four colours and which are going to be on my index finger and thumb of both my hands and according to the gestures of my hand the computer will interpret these gestures and carry out a command. For example if I have a website open, all I have to do is pinch with my fingers and the webpage will zoom. I wanted the advice of the stackoverflow community as to where to start and whether anyone has any advice for me. Thanks in advance.

Canvas.drawLines displaying disjointed segments [duplicate]

不问归期 提交于 2019-12-09 10:43:41
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: Android How to draw a smooth line following your finger I'm new to Android and java programming and have been playing around a bit with mobile app development. I recently created a View which simply keeps draws lines in step with the user's finger movements. However, I've been having some trouble with the Canvas.drawLines method. Instead of getting a continuous set of lines between all points I am getting more

Fabricjs build 1.7.15 with gesture support

丶灬走出姿态 提交于 2019-12-09 01:55:31
问题 I've been working on a project with fabricjs. Great library, but I ran into a stupid problem which I can't seem to solve. I've been working with version 1.7.15 and prefer to stick to the stable version for now instead of upgrading to version 2.0.beta. I've used a fabricjs version without gestures support so far, but now I would like to include the gesture support. Where can I build a version of fabricjs ^1.7 with gesture support now? Since the custom build on the site of fabricjs only seem to

touchesBegan with delay

梦想的初衷 提交于 2019-12-08 20:08:48
问题 I have a subclass of UIView , and added the touchesBegan and touchesEnd methods... In touchesBegan , I set the backgroundColor from white to green by using self.backgroundColor = [UIColor greenColor] ... in the touchesEnd I reset the color to white. It works but very slowly. By tapping the view, it takes 0.5 - 1.0 sec until I see the green color. Selecting a cell in a UITableView it's much faster. 回答1: Try this: self.view.userInteractionEnabled = YES; UILongPressGestureRecognizer *recognizer