-
- All Implemented Interfaces:
-
com.badlogic.gdx.Application
public interface AndroidApplicationBase implements ApplicationInterface that abstracts the Android application class usages, so that libGDX can be used with a fragment (or with any other client code)
-
-
Method Summary
Modifier and Type Method Description abstract ContextgetContext()The application or activity context abstract Array<Runnable>getRunnables()A set of usable runnables abstract Array<Runnable>getExecutedRunnables()The currently executed runnables abstract voidrunOnUiThread(Runnable runnable)Method signifies an intent of the caller to execute some action on the UI Thread. abstract voidstartActivity(Intent intent)Method signifies an intent to start an activity, may be the default method of the Activity class abstract AndroidInputgetInput()Returns the AndroidInput object associated with this AndroidApplicationBase abstract SnapshotArray<LifecycleListener>getLifecycleListeners()Returns the LifecycleListener array associated with this AndroidApplicationBase abstract WindowgetApplicationWindow()Returns the Window associated with the application abstract WindowManagergetWindowManager()Returns the WindowManager associated with the application abstract voiduseImmersiveMode(boolean b)Activates Android 4.4 KitKat's 'Immersive Mode' feature. abstract HandlergetHandler()Returns the Handler object created by the application abstract AndroidAudiocreateAudio(Context context, AndroidApplicationConfiguration config)Returns the AndroidAudio to be used by the application abstract AndroidInputcreateInput(Application activity, Context context, Object view, AndroidApplicationConfiguration config)Returns the AndroidInput to be used by the application -
Methods inherited from class com.badlogic.gdx.Application
addLifecycleListener, debug, error, exit, getApplicationListener, getApplicationLogger, getAudio, getClipboard, getFiles, getGraphics, getInput, getJavaHeap, getLogLevel, getNativeHeap, getNet, getPreferences, getType, getVersion, log, postRunnable, removeLifecycleListener, setApplicationLogger, setLogLevel -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getContext
abstract Context getContext()
The application or activity context
-
getRunnables
abstract Array<Runnable> getRunnables()
A set of usable runnables
-
getExecutedRunnables
abstract Array<Runnable> getExecutedRunnables()
The currently executed runnables
-
runOnUiThread
abstract void runOnUiThread(Runnable runnable)
Method signifies an intent of the caller to execute some action on the UI Thread.
- Parameters:
runnable- The runnable to be executed
-
startActivity
abstract void startActivity(Intent intent)
Method signifies an intent to start an activity, may be the default method of the Activity class
- Parameters:
intent- The Intent for starting an activity
-
getInput
abstract AndroidInput getInput()
Returns the AndroidInput object associated with this AndroidApplicationBase
-
getLifecycleListeners
abstract SnapshotArray<LifecycleListener> getLifecycleListeners()
Returns the LifecycleListener array associated with this AndroidApplicationBase
-
getApplicationWindow
abstract Window getApplicationWindow()
Returns the Window associated with the application
-
getWindowManager
abstract WindowManager getWindowManager()
Returns the WindowManager associated with the application
-
useImmersiveMode
abstract void useImmersiveMode(boolean b)
Activates Android 4.4 KitKat's 'Immersive Mode' feature.
- Parameters:
b- Whether or not to use immersive mode
-
getHandler
abstract Handler getHandler()
Returns the Handler object created by the application
-
createAudio
abstract AndroidAudio createAudio(Context context, AndroidApplicationConfiguration config)
Returns the AndroidAudio to be used by the application
-
createInput
abstract AndroidInput createInput(Application activity, Context context, Object view, AndroidApplicationConfiguration config)
Returns the AndroidInput to be used by the application
-
-
-
-