public class AndroidInput extends Object implements Input, android.view.View.OnKeyListener, android.view.View.OnTouchListener
Input.Buttons, Input.Keys, Input.Orientation, Input.Peripheral, Input.TextInputListener| Modifier and Type | Field and Description |
|---|---|
boolean |
accelerometerAvailable |
static int |
NUM_TOUCHES |
static int |
SUPPORTED_KEYS |
| Constructor and Description |
|---|
AndroidInput(Application activity,
android.content.Context context,
Object view,
AndroidApplicationConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
void |
addKeyListener(android.view.View.OnKeyListener listener) |
void |
cancelVibrate() |
float |
getAccelerometerX() |
float |
getAccelerometerY() |
float |
getAccelerometerZ() |
float |
getAzimuth() |
long |
getCurrentEventTime() |
int |
getDeltaX() |
int |
getDeltaX(int pointer) |
int |
getDeltaY() |
int |
getDeltaY(int pointer) |
int |
getFreePointerIndex() |
InputProcessor |
getInputProcessor() |
Input.Orientation |
getNativeOrientation() |
float |
getPitch() |
float |
getRoll() |
int |
getRotation() |
void |
getRotationMatrix(float[] matrix)
Returns the rotation matrix describing the devices rotation as per SensorManager#getRotationMatrix(float[], float[], float[], float[]).
|
void |
getTextInput(Input.TextInputListener listener,
String title,
String text,
String hint) |
int |
getX() |
int |
getX(int pointer) |
int |
getY() |
int |
getY(int pointer) |
boolean |
isButtonPressed(int button) |
boolean |
isCatchBackKey() |
boolean |
isCatchMenuKey() |
boolean |
isCursorCatched() |
boolean |
isKeyJustPressed(int key) |
boolean |
isKeyPressed(int key) |
boolean |
isPeripheralAvailable(Input.Peripheral peripheral) |
boolean |
isTouched() |
boolean |
isTouched(int pointer) |
boolean |
justTouched() |
int |
lookUpPointerIndex(int pointerId) |
void |
onDrop(int x,
int y)
Called in
AndroidLiveWallpaperService on drop |
boolean |
onKey(android.view.View v,
int keyCode,
android.view.KeyEvent e) |
void |
onPause() |
void |
onResume() |
void |
onTap(int x,
int y)
Called in
AndroidLiveWallpaperService on tap |
boolean |
onTouch(android.view.View view,
android.view.MotionEvent event) |
void |
setCatchBackKey(boolean catchBack) |
void |
setCatchMenuKey(boolean catchMenu) |
void |
setCursorCatched(boolean catched) |
void |
setCursorPosition(int x,
int y) |
void |
setInputProcessor(InputProcessor processor) |
void |
setOnscreenKeyboardVisible(boolean visible) |
void |
vibrate(int milliseconds) |
void |
vibrate(long[] pattern,
int repeat) |
public static final int NUM_TOUCHES
public static final int SUPPORTED_KEYS
public boolean accelerometerAvailable
public AndroidInput(Application activity, android.content.Context context, Object view, AndroidApplicationConfiguration config)
public float getAccelerometerX()
getAccelerometerX in interface Inputpublic float getAccelerometerY()
getAccelerometerY in interface Inputpublic float getAccelerometerZ()
getAccelerometerZ in interface Inputpublic void getTextInput(Input.TextInputListener listener, String title, String text, String hint)
getTextInput in interface Inputpublic boolean isKeyPressed(int key)
isKeyPressed in interface Inputpublic boolean isKeyJustPressed(int key)
isKeyJustPressed in interface Inputpublic void setInputProcessor(InputProcessor processor)
setInputProcessor in interface Inputpublic boolean onTouch(android.view.View view,
android.view.MotionEvent event)
onTouch in interface android.view.View.OnTouchListenerpublic void onTap(int x,
int y)
AndroidLiveWallpaperService on tapx - y - public void onDrop(int x,
int y)
AndroidLiveWallpaperService on dropx - y - public boolean onKey(android.view.View v,
int keyCode,
android.view.KeyEvent e)
onKey in interface android.view.View.OnKeyListenerpublic void setOnscreenKeyboardVisible(boolean visible)
setOnscreenKeyboardVisible in interface Inputpublic void setCatchBackKey(boolean catchBack)
setCatchBackKey in interface Inputpublic boolean isCatchBackKey()
isCatchBackKey in interface Inputpublic void setCatchMenuKey(boolean catchMenu)
setCatchMenuKey in interface Inputpublic boolean isCatchMenuKey()
isCatchMenuKey in interface Inputpublic void cancelVibrate()
cancelVibrate in interface Inputpublic boolean justTouched()
justTouched in interface Inputpublic boolean isButtonPressed(int button)
isButtonPressed in interface Inputpublic void getRotationMatrix(float[] matrix)
getRotationMatrix in interface Inputmatrix - public float getAzimuth()
getAzimuth in interface Inputpublic InputProcessor getInputProcessor()
getInputProcessor in interface Inputpublic boolean isPeripheralAvailable(Input.Peripheral peripheral)
isPeripheralAvailable in interface Inputpublic int getFreePointerIndex()
public int lookUpPointerIndex(int pointerId)
public int getRotation()
getRotation in interface Inputpublic Input.Orientation getNativeOrientation()
getNativeOrientation in interface Inputpublic void setCursorCatched(boolean catched)
setCursorCatched in interface Inputpublic boolean isCursorCatched()
isCursorCatched in interface Inputpublic void setCursorPosition(int x,
int y)
setCursorPosition in interface Inputpublic long getCurrentEventTime()
getCurrentEventTime in interface Inputpublic void addKeyListener(android.view.View.OnKeyListener listener)
public void onPause()
public void onResume()
Copyright © 2015. All rights reserved.