安卓gesture builderbuilder无法创建手势

今日论坛第 1 个签到,每日签到可得财富值+2,连续5天签到后再连续签到则每日可得财富值
+4,记得每天都来签到哦~
上一主题:
下一主题:
查看: 361 | 回复: 1
【dospy安卓资源组】iGest手势控制 Gesture Launcher 2.6.0.8 官方中文版!!!
财富值 148097
好评度 351
交易信用 0
人气值 23697
积分/帖子:31665
连续签到天数:1
全部签到天数:962
注册时间:
手机型号:
状态: 离线
【dospy安卓资源组】iGest手势控制 Gesture Launcher 2.6.0.8 官方中文版!!!
screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {} else {window.open(this.src);}" onmousewheel="return imgzoom(this);" alt="" />screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {} else {window.open(this.src);}" onmousewheel="return imgzoom(this);" alt="" />
软件名称:iGest手势启动器
版本信息/软件版本:2.6.0.8
是否中文:是
软件大小:3.9M
测试系统:4.1
测试机型:M2软件介绍:
iGest手势启动器Gesture Launcher
用一个手势你能启动应用程序, 打电话,开动上载,开动站点以及更多!
优越性iGest
- 很多功能和控制手势显著加快与您的设备的工作!
- 手势可以直接使用锁屏。现在,为了打开应用程序或打电话,甚至都不需要使用您的手机。
- 在锁屏上有一个扫描仪为指纹。
- 舒适的机动按钮帮助你用象征任何地方!
- 非常适于手势识别的准确性。独特的能力,可以适应您的手写和识别任何手势。
- 简单也易于使用的界面,帮助你快配置所需的手势。
- iGest 唯一的应用程序,它支持多点触控手势。
试试吧!你需要做的就是拿出一个手势,它与动作相关联。
你可以做什么手势?
- 运行应用程序
- 拨打和接听电话
- 打开一个网页
- 打开文件
- 锁屏手机
- 创建短信
- 创建电子邮件
- 打开手电筒
- 还有更多...
安装iGest完全免费,享受一个舒适的工作!
软件截图:
screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {} else {window.open(this.src);}" onmousewheel="return imgzoom(this);" alt="" />screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {} else {window.open(this.src);}" onmousewheel="return imgzoom(this);" alt="" />软件下载:screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {} else {window.open(this.src);}" onmousewheel="return imgzoom(this);" alt="" />
screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {} else {window.open(this.src);}" onmousewheel="return imgzoom(this);" alt="" />
财富值 148097
好评度 351
交易信用 0
人气值 23697
积分/帖子:31665
连续签到天数:1
全部签到天数:962
注册时间:
手机型号:
状态: 离线
更多精彩:
screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {} else {window.open(this.src);}" onmousewheel="return imgzoom(this);" alt="" />
微信扫一扫关注dospy4493人阅读
Android(43)
手势库的创建:
使用SDK自带的例子GestureBuilder建立手势库,这个文件夹存在于android\android-sdk-windows\samples\android-10\GestureBuilder,在使用之前需要恢复其到开发环境中,然后运行其项目,就可以设定手势了。
创建一个项目,名为GestureBuilder(创建时activity可要可不要,因为后面要进行覆盖)
打开创建好的项目,我们都已经很了解里面都有什么文件,如图:
然后打开SDK自带的例子的文件夹,会有以下5个文件:
然后把前四个文件复制到我们新建的那个项目的文件中,并覆盖原有的,覆盖后的文件夹(选中的是复制过来的):
现在打开Eclipse,刷新一下项目,然后可以运行这个项目了。
运行起来后,显示:
然后画出一个图形,并给它一个名字:
如果是自己想要的就点击Done&这个按钮(就会保存到文件中)
如果不满意想要重画就在黑色屏幕上点一下就可以重新画了
根据这个步骤你可以随意的制定自己想要的任何手势,定义的这些手势都会保存到mnt/sdcard目录下:
当想要使用这个手势库的话,要把这个文件导出,选中文件,点击下图中的图标,导出到你指定的位置:
这样就OK了,要用的话直接把导出的文件复制进去即可
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:1022828次
积分:10567
积分:10567
排名:第878名
原创:201篇
评论:299条
(1)(2)(1)(4)(1)(2)(5)(3)(4)(5)(4)(6)(2)(7)(2)(2)(19)(9)(10)(8)(36)(22)(24)(23)下次自动登录
现在的位置:
& 综合 & 正文
Android 手势识别,使用SimpleOnGestureListener,OnGestureListener,OnDoubleTapListener
一、 效果图
在Android中自定义控件通常都会涉及到触摸手势,需要判断用户是点击、滑动、Fling、按下等状态,当前这些都可以通过自己在onTouchEvent中通过MotionEvent回调参数判断得到,但是也可以使用Android系统提供的辅助类SimpleOnGestureListener,以下是继承自此类,主要目的是为了观察各个回调的作用。
如果想了解跟多系统是如何判断是这些手势的可以查看其源码,也可以看下ListView,Gallery的源码前者是在AbsListView中如何判断Tap、Scroll、Fling手势,后者使用的和本文一样,也可以查看其源码更详细的了解当前辅助类的用法。
private class DefaultGestureListener extends SimpleOnGestureListener {
// Touch down时触发
public boolean onDown(MotionEvent e) {
updateLog("onDown");
return super.onDown(e);
// 在Touch down之后一定时间(115ms)触发
public void onShowPress(MotionEvent e) {
updateLog("onShowPress");
public boolean onSingleTapUp(MotionEvent e) {
updateLog("onSingleTapUp");
return super.onSingleTapUp(e);
// 滑动时触发
public boolean onScroll(MotionEvent e1, MotionEvent e2,
float distanceX, float distanceY) {
updateLog("onScroll");
return super.onScroll(e1, e2, distanceX, distanceY);
// 滑动一段距离,up时触发
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
float velocityY) {
updateLog("onFling");
return super.onFling(e1, e2, velocityX, velocityY);
// 长按后触发(Touch down之后一定时间(500ms))
public void onLongPress(MotionEvent e) {
updateLog("onLongPress");
创建与触发手势
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
(TextView) findViewById(R.id.output);
output("");
mGestureDetector = new GestureDetector(this, new DefaultGestureListener());
public boolean onTouchEvent(MotionEvent event) {
// 按下时清理之前的记录
if (event.getAction() == MotionEvent.ACTION_DOWN) {
mRecordMap.clear();
return mGestureDetector.onTouchEvent(event);
上完整代码
package loveworld.
import java.util.LinkedHashM
import java.util.M
import android.app.A
import android.os.B
import android.text.TextU
import android.util.L
import android.view.GestureD
import android.view.GestureDetector.SimpleOnGestureL
import android.view.MotionE
import android.widget.TextV
* 手势识别
* 1. 继承自SimpleOnGestureListener创建子类
* 2. 覆写相应的方法,包括长按,滑动之类的
* 3. Activity中创建 GestureDetector, 传入自定义子类实例mGestureDetector
* 4. Activity覆写onTouchEvent并返回mGestureDetector.onTouchEvent(event);
public class GestureDetectorDemoActivity extends Activity {
// ===========================================================
// Constants
// ===========================================================
// ===========================================================
// ===========================================================
private TextView mO
private GestureDetector mGestureD
private LinkedHashMap&String, Integer& mRecordMap = new LinkedHashMap&String, Integer&();
// ===========================================================
// Constructors
// ===========================================================
// ===========================================================
// Public Methods
// ===========================================================
// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
(TextView) findViewById(R.id.output);
output("");
mGestureDetector = new GestureDetector(this, new DefaultGestureListener());
public boolean onTouchEvent(MotionEvent event) {
// 按下时清理之前的记录
if (event.getAction() == MotionEvent.ACTION_DOWN) {
mRecordMap.clear();
return mGestureDetector.onTouchEvent(event);
// ===========================================================
// Private Methods
// ===========================================================
private void updateLog(String name) {
if (TextUtils.isEmpty(name)) {
if (mRecordMap == null) {
Log.e("Test", "mRecordMap == null");
// 不存在创建新的
boolean containsKey = mRecordMap.containsKey(name);
if (!containsKey) {
mRecordMap.put(name, 0);
// 获取之前记录
int oldCount = mRecordMap.get( name );
int count = oldCount + 1;
// 更新记录
mRecordMap.put(name, count);
// 拼接出来
StringBuilder stringBuilder = new StringBuilder();
for (Map.Entry&String, Integer& entry : mRecordMap.entrySet()) {
String key = entry.getKey();
Integer value = entry.getValue();
stringBuilder.append("执行方法 : " + key);
stringBuilder.append(" , 执行次数 : " + value);
stringBuilder.append("\n");
output( stringBuilder.toString() );
private void output(String output) {
mOutput.setText("手指在屏幕滑动:\n" + output);
// ===========================================================
// Inner and Anonymous Classes
// ===========================================================
private class DefaultGestureListener extends SimpleOnGestureListener {
// Touch down时触发
public boolean onDown(MotionEvent e) {
updateLog("onDown");
return super.onDown(e);
// 在Touch down之后一定时间(115ms)触发
public void onShowPress(MotionEvent e) {
updateLog("onShowPress");
public boolean onSingleTapUp(MotionEvent e) {
updateLog("onSingleTapUp");
return super.onSingleTapUp(e);
// 滑动时触发
public boolean onScroll(MotionEvent e1, MotionEvent e2,
float distanceX, float distanceY) {
updateLog("onScroll");
return super.onScroll(e1, e2, distanceX, distanceY);
// 滑动一段距离,up时触发
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
float velocityY) {
updateLog("onFling");
return super.onFling(e1, e2, velocityX, velocityY);
// 长按后触发(Touch down之后一定时间(500ms))
public void onLongPress(MotionEvent e) {
updateLog("onLongPress");
二 布局layout.xml
&?xml version="1.0" encoding="utf-8"?&
&LinearLayout xmlns:android="/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" &
android:id="@+id/output"
android:layout_width="fill_parent"
android:layout_height="wrap_content" /&
&/LinearLayout&
三、另外一种使用方式
自定义类继承自SimpleOnGestureListener且实现OnTouchListener,在自定义视图创建的时候创建此自定义类且setOnTouchListener( 当前自定义类对象 )。
那自自定义类与当前自定义视图onTouchEvent的调用顺序?
setOnTouchListener 与 onTouchEvent覆写方法 关系 - setOnTouchListener 是在当前视图的dispatchTouchEvent 中调用
四、可能遇到的问题
如果onScroll、onFling不执行可以尝试覆写onDown返回true
转载请注明出处:
完全重写本篇
添加可能遇到的问题
&&&&推荐文章:
【上篇】【下篇】

我要回帖

更多关于 gesture builder 的文章

 

随机推荐