当前位置: 首页>>代码示例>>Java>>正文


Java Gesture.TAP属性代码示例

本文整理汇总了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;
}
 
开发者ID:longzheng,项目名称:PTVGlass,代码行数:18,代码来源:SetTimerActivity.java

示例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;
}
 
开发者ID:stefansundin,项目名称:glass-movies,代码行数:25,代码来源:Touchpad.java

示例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;
    }
}
 
开发者ID:a-paxton,项目名称:PsyGlass,代码行数:12,代码来源:MainActivity.java

示例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;
}
 
开发者ID:a-paxton,项目名称:PsyGlass,代码行数:10,代码来源:GameActivity.java

示例5: onGesture

@Override
public boolean onGesture(Gesture gesture) {
    if (gesture == Gesture.TAP) {
        mAudioManager.playSoundEffect(Sounds.TAP);
        openOptionsMenu();
        return true;
    } else {
        return false;
    }
}
 
开发者ID:locateflow,项目名称:gdk-charades-sample-master,代码行数:10,代码来源:StartGameActivity.java

示例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;
}
 
开发者ID:GlassTune,项目名称:GlassTune,代码行数:13,代码来源:AlertDialog.java

示例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;
}
 
开发者ID:longzheng,项目名称:PTVGlass,代码行数:12,代码来源:SelectValueActivity.java

示例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;
}
 
开发者ID:mimming,项目名称:gdk-sugar-glider,代码行数:10,代码来源:SetMapZoomActivity.java

示例9: onGesture

@Override
public boolean onGesture(Gesture gesture) {
	if(gesture == Gesture.TAP) {
		dismiss();
		return true;
	} else {
		return false;
	}
}
 
开发者ID:AlephNull0,项目名称:glass-movie-player,代码行数:9,代码来源:VolumeDialog.java

示例10: onGesture

@Override
public boolean onGesture(Gesture gesture) {
	if(gesture == Gesture.TAP) {
		paused = true;
		openOptionsMenu();
		pauseMovie();
		return true;
	} 

	return false;
}
 
开发者ID:AlephNull0,项目名称:glass-movie-player,代码行数:11,代码来源:MoviePlayerActivity.java


注:本文中的com.google.android.glass.touchpad.Gesture.TAP属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。