本文整理汇总了Java中org.oscim.event.Gesture.Tap方法的典型用法代码示例。如果您正苦于以下问题:Java Gesture.Tap方法的具体用法?Java Gesture.Tap怎么用?Java Gesture.Tap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.oscim.event.Gesture
的用法示例。
在下文中一共展示了Gesture.Tap方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onGesture
import org.oscim.event.Gesture; //导入方法依赖的package包/类
@Override
public boolean onGesture(Gesture g, MotionEvent e) {
if (!(e instanceof MotionHandler)) return false;
if (g instanceof Gesture.Tap)
return activateSelectedItems(e, mActiveItemSingleTap);
if (g instanceof Gesture.LongPress)
return activateSelectedItems(e, mActiveItemLongPress);
return false;
}
示例2: onGesture
import org.oscim.event.Gesture; //导入方法依赖的package包/类
@Override
public boolean onGesture(Gesture g, MotionEvent e) {
if (g instanceof Gesture.Tap)
return activateSelectedItems(e, mActiveItemSingleTap);
//noinspection SimplifiableIfStatement
if (g instanceof Gesture.LongPress)
return activateSelectedItems(e, mActiveItemLongPress);
return false;
}
示例3: onGesture
import org.oscim.event.Gesture; //导入方法依赖的package包/类
@Override
public boolean onGesture(Gesture gesture, MotionEvent event) {
Point point = new Point();
mMap.viewport().fromScreenPoint(event.getX(), event.getY(), point);
int tileX = (int) (point.getX() / TILE_SCALE);
int tileY = (int) (point.getY() / TILE_SCALE);
if (tileX < 0 || tileX > 127 || tileY < 0 || tileY > 127)
return false;
Index.MapStatus mapStatus = mMapIndex.getNativeMap(tileX, tileY);
if (gesture instanceof Gesture.LongPress) {
if (mapStatus.downloading != 0L)
mMapIndex.selectNativeMap(tileX, tileY, Index.ACTION.CANCEL);
else if (mapStatus.created > 0)
mMapIndex.selectNativeMap(tileX, tileY, Index.ACTION.REMOVE);
return true;
}
if (gesture instanceof Gesture.Tap || gesture instanceof Gesture.DoubleTap) {
if (mapStatus.downloading != 0L)
return true;
if (mMapIndex.hasDownloadSizes()) {
if (mapStatus.downloadSize == 0L)
return true;
}
mMapIndex.selectNativeMap(tileX, tileY, Index.ACTION.DOWNLOAD);
return true;
}
return false;
}
示例4: onGesture
import org.oscim.event.Gesture; //导入方法依赖的package包/类
@Override
public boolean onGesture(final Gesture g, final MotionEvent e) {
if (g instanceof Gesture.Tap) {
return activateSelectedMarker(e, _activeMarker_SingleTap);
}
if (g instanceof Gesture.LongPress) {
return activateSelectedMarker(e, _ActiveMarker_LongPress);
}
return false;
}
示例5: onGesture
import org.oscim.event.Gesture; //导入方法依赖的package包/类
@Override
public boolean onGesture(Gesture g, MotionEvent e) {
if (g instanceof Gesture.Tap)
return activateSelectedItems(e, mActiveItemSingleTap);
if (g instanceof Gesture.LongPress)
return activateSelectedItems(e, mActiveItemLongPress);
return false;
}