本文整理汇总了Java中android.support.wearable.watchface.WatchFaceService.TAP_TYPE_TAP属性的典型用法代码示例。如果您正苦于以下问题:Java WatchFaceService.TAP_TYPE_TAP属性的具体用法?Java WatchFaceService.TAP_TYPE_TAP怎么用?Java WatchFaceService.TAP_TYPE_TAP使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.support.wearable.watchface.WatchFaceService
的用法示例。
在下文中一共展示了WatchFaceService.TAP_TYPE_TAP属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onTapCommand
@Override
public void onTapCommand(@TapType int tapType, int x, int y, long eventTime) {
switch (tapType) {
case WatchFaceService.TAP_TYPE_TAP:
//detect screen area (CENTER_LEFT, CENTER_RIGHT, BOTTOM_CENTER)
handleTouch(x,y);
invalidate();
break;
case WatchFaceService.TAP_TYPE_TOUCH:
break;
case WatchFaceService.TAP_TYPE_TOUCH_CANCEL:
break;
default:
super.onTapCommand(tapType, x, y, eventTime);
break;
}
}
示例2: onTapCommand
@Override
public void onTapCommand(@TapType int tapType, int x, int y, long eventTime) {
switch (tapType) {
case WatchFaceService.TAP_TYPE_TAP:
//switch between date infos
if(INFO_DETAILS_MODE == 0) INFO_DETAILS_MODE =1;
else INFO_DETAILS_MODE = 0;
invalidate();
break;
case WatchFaceService.TAP_TYPE_TOUCH:
break;
case WatchFaceService.TAP_TYPE_TOUCH_CANCEL:
break;
default:
super.onTapCommand(tapType, x, y, eventTime);
break;
}
}
示例3: onTapCommand
@Override
public void onTapCommand(@TapType int tapType, int x, int y, long eventTime) {
switch (tapType) {
case WatchFaceService.TAP_TYPE_TAP:
mBlurred = !mBlurred;
SharedPreferences preferences =
PreferenceManager.getDefaultSharedPreferences(MuzeiWatchFace.this);
preferences.edit().putBoolean(BLURRED_PREF_KEY, mBlurred).apply();
updateWatchFaceStyle();
invalidate();
break;
default:
super.onTapCommand(tapType, x, y, eventTime);
break;
}
}
示例4: onTapCommand
@Override
public void onTapCommand(
@TapType int tapType, int x, int y, long eventTime) {
switch (tapType) {
case WatchFaceService.TAP_TYPE_TAP:
// Handle the tap
Toast.makeText(PacktWatchFace.this, "Tapped", Toast.LENGTH_SHORT).show();
break;
// There are other cases, not mentioned here. <a href="https://developer.android.com/training/wearables/watch-faces/interacting.html">Read Android guide</a>
default:
super.onTapCommand(tapType, x, y, eventTime);
break;
}
}
示例5: onTapCommand
@Override
public void onTapCommand(
@TapType int tapType, int x, int y, long eventTime) {
switch (tapType) {
case WatchFaceService.TAP_TYPE_TAP:
break;
case WatchFaceService.TAP_TYPE_TOUCH:
break;
case WatchFaceService.TAP_TYPE_TOUCH_CANCEL:
break;
default:
super.onTapCommand(tapType, x, y, eventTime);
break;
}
}