mapView Double-click Event Monitoring

public class MyMapView extends MapView (

private long lastTouchTime = -1;

public MyMapView (Context context, AttributeSet attrs) (

super (context, attrs);
)

@ Override
public boolean onInterceptTouchEvent (MotionEvent ev) (

if (ev.getAction () == MotionEvent.ACTION_DOWN) (

long thisTime = System.currentTimeMillis ();
if (thisTime - lastTouchTime <250) (

/ / Double tap
this.getController (). zoomInFixing ((int) ev.getX (), (int) ev.getY ());
lastTouchTime = -1;

) Else (

/ / Too slow
lastTouchTime = thisTime;
)
)

return super.onInterceptTouchEvent (ev);
)

分类:Mobile 时间:2010-08-22 人气:182
分享到:
blog comments powered by Disqus

相关文章

  • [Forward] AS3 Double Click and mouseChildren 2010-12-03

    From http://www.charglerode.com/blog/?p=54 As an interface and game developer, I find myself struggling with Flash as a development platform because of it's lack of support for common inputs. Flash has grown over the last decade as a serious casual g

  • Double click a button to install - Java installation program production 2011-04-22

    Double click a button to install - Java installation program production Title: A double-click the Run button to install - Java installation program made of: Jason Du Time: 2009-3-23 Original: http://www.blogjava.net/javapro/archive/2009/03/24/JavaApp

  • With the timer delay to achieve the mouse double click event events, click and double-click events independently of each other! 2010-03-29

    import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.util.Date; import java.util.Timer; /** * Use the timer delay click event implements mouse double-click event , Click and double-click event from interfering with each o

  • FLASH must solve the double click to use, and IE6 popup FLASH Player Press OK to continue loading the ... 2010-11-02

    No need to use IE, click the activation method can be embedded in Flash, ie swfobject.js <div></div> <script type='text/javascript'> var so = new SWFObject('flash/top.swf','mpl','750','278','9'); so.addParam('quality','high'); so.addPara

  • Double click to run. Class files 2010-11-26

    To give beginners, as you hit the command execution without having to cmd ~ class of problems @ Echo off rem ------------------------------------------------- -------------------------- rem runClassV3.0.bat Double-click the batch can be installed rem

  • modify touch pad double click speed 2011-05-11

    use command: synclient MaxDoubleTapTime=1

  • Ubuntu keyboard press (double click) to enter characters solutions 2010-11-15

    This occurs because the keyboard I accidentally set to only accept long keypress In system-> preferences-> keyboard accessibility in the will only accept long keypress before removing the hook, especially for the record in this

  • Alchemy (3 )---- An Alchemy speed test 2010-04-18

    An Alchemy speed test Following from My previous articles on setting up an Alchemy development environment in Flex Builder 3 and passing / returning objects to / from C + + , I wanted to test some of the claims of the speed increase possible with the

  • All I wantto do is make flex easy 2010-05-07

    whatever your application is game or not, your must need to distinguish between click_event and double_click_event. As you kown flex have the double click enable. but that not enough. There is a usecase: some data in a datagrid. And now, user click t

  • All I want to do is make flex easy 2010-05-07

    whatever your application is game or not, your must need to distinguish between click_event and double_click_event. As you kown flex have the double click enable. but that not enough. There is a usecase: some data in a datagrid. And now, user click t

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.150 (s). 12 q(s)