本文整理汇总了Java中com.google.android.glass.touchpad.Gesture.TAP属性的典型用法代码示例。如果您正苦于以下问题:Java Gesture.TAP属性的具体用法?Java Gesture.TAP怎么用?Java Gesture.TAP使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.google.android.glass.touchpad.Gesture
的用法示例。
在下文中一共展示了Gesture.TAP属性的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onGesture
@Override
public boolean onGesture(Gesture gesture) {
if (gesture == Gesture.TAP) {
int position = mView.getSelectedItemPosition();
SetTimerScrollAdapter.TimeComponents component =
(SetTimerScrollAdapter.TimeComponents) mAdapter.getItem(position);
Intent selectValueIntent = new Intent(this, SelectValueActivity.class);
selectValueIntent.putExtra(SelectValueActivity.EXTRA_COUNT, component.getMaxValue());
selectValueIntent.putExtra(
SelectValueActivity.EXTRA_INITIAL_VALUE,
(int) mAdapter.getTimeComponent(component));
startActivityForResult(selectValueIntent, SELECT_VALUE);
mAudioManager.playSoundEffect(AudioManager.FX_KEY_CLICK);
return true;
}
return false;
}
示例2: onGesture
public boolean onGesture(Gesture gesture) {
Object item = mListView.getSelectedItem();
if (item == null) {
return false;
}
String filename = item.toString();
if (gesture == Gesture.TAP) {
mActivity.launchVideo(filename);
return true;
}
else if (gesture == Gesture.TWO_TAP) {
mActivity.say(filename);
return true;
}
/*else if (gesture == Gesture.SWIPE_RIGHT) {
Log.d("stefan", "Gesture.SWIPE_RIGHT");
return true;
}
else if (gesture == Gesture.SWIPE_LEFT) {
Log.d("stefan", "Gesture.SWIPE_LEFT");
return true;
}*/
return false;
}
示例3: onGesture
@Override
public boolean onGesture(Gesture gesture) {
if (gesture == Gesture.TAP) {
// Audio manager used to play system sound effects
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
audioManager.playSoundEffect(Sounds.TAP);
openOptionsMenu();
return true;
} else {
return false;
}
}
示例4: onGesture
@Override
public boolean onGesture(Gesture gesture) {
if (gesture == Gesture.TAP) {
// Audio manager used to play system sound effects
AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
audioManager.playSoundEffect(Sounds.TAP);
openOptionsMenu();
}
return true;
}
示例5: onGesture
@Override
public boolean onGesture(Gesture gesture) {
if (gesture == Gesture.TAP) {
mAudioManager.playSoundEffect(Sounds.TAP);
openOptionsMenu();
return true;
} else {
return false;
}
}
示例6: onGesture
@Override
public boolean onGesture(Gesture gesture) {
if (gesture == Gesture.TAP) {
mAudioManager.playSoundEffect(Sounds.TAP);
if (mOnClickListener != null) {
// Since Glass dialogs do not have buttons,
// the index passed to onClick is always 0.
mOnClickListener.onClick(AlertDialog.this, 0);
}
return true;
}
return false;
}
示例7: onGesture
@Override
public boolean onGesture(Gesture gesture) {
if (gesture == Gesture.TAP) {
Intent resultIntent = new Intent();
resultIntent.putExtra(EXTRA_SELECTED_VALUE, mView.getSelectedItemPosition());
setResult(RESULT_OK, resultIntent);
mAudioManager.playSoundEffect(AudioManager.FX_KEY_CLICK);
finish();
return true;
}
return false;
}
示例8: onGesture
@Override
public boolean onGesture(Gesture gesture) {
if (gesture == Gesture.TAP) {
mAudioManager.playSoundEffect(Sounds.TAP);
mMapDisplayService.setZoom(mCardScrollView.getSelectedItemPosition() + MIN_ZOOM);
finish();
return true;
}
return false;
}
示例9: onGesture
@Override
public boolean onGesture(Gesture gesture) {
if(gesture == Gesture.TAP) {
dismiss();
return true;
} else {
return false;
}
}
示例10: onGesture
@Override
public boolean onGesture(Gesture gesture) {
if(gesture == Gesture.TAP) {
paused = true;
openOptionsMenu();
pauseMovie();
return true;
}
return false;
}