Package com.jme3.input.android
Class AndroidInputHandler
java.lang.Object
com.jme3.input.android.AndroidInputHandler
- All Implemented Interfaces:
android.view.View.OnKeyListener
,android.view.View.OnTouchListener
- Direct Known Subclasses:
AndroidInputHandler14
public class AndroidInputHandler
extends 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.
-
Field Summary
Modifier and TypeFieldDescriptionprotected AndroidJoyInput
protected AndroidTouchInput
protected android.opengl.GLSurfaceView
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addListeners
(android.opengl.GLSurfaceView view) 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)
-
Field Details
-
view
protected android.opengl.GLSurfaceView view -
touchInput
-
joyInput
-
-
Constructor Details
-
AndroidInputHandler
public AndroidInputHandler()
-
-
Method Details
-
setView
public void setView(android.view.View view) -
getView
public android.view.View getView() -
removeListeners
protected void removeListeners(android.opengl.GLSurfaceView view) -
addListeners
protected void addListeners(android.opengl.GLSurfaceView view) -
loadSettings
-
getTouchInput
-
getJoyInput
-
onTouch
public boolean onTouch(android.view.View view, android.view.MotionEvent event) - Specified by:
onTouch
in interfaceandroid.view.View.OnTouchListener
-
onKey
public boolean onKey(android.view.View view, int keyCode, android.view.KeyEvent event) - Specified by:
onKey
in interfaceandroid.view.View.OnKeyListener
-