public class AndroidInputHandler
extends java.lang.Object
implements android.view.View.OnTouchListener, android.view.View.OnKeyListener
AndroidInput
is the main class that connects the Android system
inputs to jME. It receives the inputs from the Android View and passes them
to the appropriate classes based on the source of the input.
This class is to be extended when new functionality is released in Android.Modifier and Type | Field and Description |
---|---|
protected AndroidJoyInput |
joyInput |
protected AndroidTouchInput |
touchInput |
protected android.opengl.GLSurfaceView |
view |
Constructor and Description |
---|
AndroidInputHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
addListeners(android.opengl.GLSurfaceView view) |
JoyInput |
getJoyInput() |
TouchInput |
getTouchInput() |
android.view.View |
getView() |
void |
loadSettings(AppSettings settings) |
boolean |
onKey(android.view.View view,
int keyCode,
android.view.KeyEvent event) |
boolean |
onTouch(android.view.View view,
android.view.MotionEvent event) |
protected void |
removeListeners(android.opengl.GLSurfaceView view) |
void |
setView(android.view.View view) |
protected android.opengl.GLSurfaceView view
protected AndroidTouchInput touchInput
protected AndroidJoyInput joyInput
public void setView(android.view.View view)
public android.view.View getView()
protected void removeListeners(android.opengl.GLSurfaceView view)
protected void addListeners(android.opengl.GLSurfaceView view)
public void loadSettings(AppSettings settings)
public TouchInput getTouchInput()
public JoyInput getJoyInput()
public boolean onTouch(android.view.View view, android.view.MotionEvent event)
onTouch
in interface android.view.View.OnTouchListener
public boolean onKey(android.view.View view, int keyCode, android.view.KeyEvent event)
onKey
in interface android.view.View.OnKeyListener