Back to project page GlassSensorTest.
The source code is released under:
Apache License
If you think the Android project GlassSensorTest listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.prt.sensor; /*from w w w . j ava2 s . com*/ import com.badlogic.gdx.Gdx; import com.badlogic.gdx.InputProcessor; public class InputHandler implements InputProcessor { private TestSensor testSensor; public InputHandler(TestSensor app) { testSensor = app; } @Override public boolean keyDown(int keycode) { switch (Gdx.app.getType()) { case Android: if (keycode == 23) testSensor.toggleFile(); return true; default: break; } return false; } @Override public boolean keyUp(int keycode) { // TODO Auto-generated method stub return false; } @Override public boolean keyTyped(char character) { // TODO Auto-generated method stub return false; } @Override public boolean touchDown(int screenX, int screenY, int pointer, int button) { // TODO Auto-generated method stub return false; } @Override public boolean touchUp(int screenX, int screenY, int pointer, int button) { // TODO Auto-generated method stub return false; } @Override public boolean touchDragged(int screenX, int screenY, int pointer) { // TODO Auto-generated method stub return false; } @Override public boolean mouseMoved(int screenX, int screenY) { // TODO Auto-generated method stub return false; } @Override public boolean scrolled(int amount) { // TODO Auto-generated method stub return false; } }