I’m a beginner programmer on google glass and i try to use the OnKeyDown
function to detect a tap on the D-pad, but I have a problem with this function when i detect the tap event I want to put a text on the screen.
I search in other post and I can't find an answer.
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
CardBuilder card = new CardBuilder(this, CardBuilder.Layout.TEXT);
if(keyCode == KeyEvent.KEYCODE_DPAD_CENTER){
card.setText(R.string.touchpad);
return true;
}
return false;
}