public class AndroidFragmentApplication extends android.support.v4.app.Fragment implements AndroidApplicationBase
AndroidApplicationBase that is based on the Fragment class. This class is similar in use
to the AndroidApplication class, which is based on an Activity.| Modifier and Type | Class and Description |
|---|---|
static interface |
AndroidFragmentApplication.Callbacks
Callbacks interface for letting the fragment interact with the Activitiy, parent fragment or target fragment.
|
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedStateApplication.ApplicationType| Modifier and Type | Field and Description |
|---|---|
android.os.Handler |
handler |
MINIMUM_SDKLOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_NONE| Constructor and Description |
|---|
AndroidFragmentApplication() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAndroidEventListener(AndroidEventListener listener)
Adds an event listener for Android specific event such as onActivityResult(...).
|
void |
addLifecycleListener(LifecycleListener listener) |
void |
debug(String tag,
String message) |
void |
debug(String tag,
String message,
Throwable exception) |
void |
error(String tag,
String message) |
void |
error(String tag,
String message,
Throwable exception) |
void |
exit() |
ApplicationListener |
getApplicationListener() |
android.view.Window |
getApplicationWindow()
Returns the Window associated with the application
|
Audio |
getAudio() |
Clipboard |
getClipboard() |
android.content.Context |
getContext()
The application or activity context
|
Array<Runnable> |
getExecutedRunnables()
The currently executed runnables
|
Files |
getFiles() |
Graphics |
getGraphics() |
android.os.Handler |
getHandler()
Returns the Handler object created by the application
|
AndroidInput |
getInput()
Returns the
AndroidInput object associated with this AndroidApplicationBase |
long |
getJavaHeap() |
SnapshotArray<LifecycleListener> |
getLifecycleListeners()
Returns the
LifecycleListener array associated with this AndroidApplicationBase |
int |
getLogLevel() |
long |
getNativeHeap() |
Net |
getNet() |
Preferences |
getPreferences(String name) |
Array<Runnable> |
getRunnables()
A set of usable runnables
|
Application.ApplicationType |
getType() |
int |
getVersion() |
android.view.WindowManager |
getWindowManager()
Returns the WindowManager associated with the application
|
android.view.View |
initializeForView(ApplicationListener listener)
This method has to be called in the
Fragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) method. |
android.view.View |
initializeForView(ApplicationListener listener,
AndroidApplicationConfiguration config)
This method has to be called in the
Fragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) method. |
void |
log(String tag,
String message) |
void |
log(String tag,
String message,
Throwable exception) |
void |
onActivityResult(int requestCode,
int resultCode,
android.content.Intent data) |
void |
onAttach(android.app.Activity activity) |
void |
onConfigurationChanged(android.content.res.Configuration config) |
void |
onDetach() |
void |
onPause() |
void |
onResume() |
void |
postRunnable(Runnable runnable) |
void |
removeAndroidEventListener(AndroidEventListener listener)
Removes an event listener for Android specific event such as onActivityResult(...).
|
void |
removeLifecycleListener(LifecycleListener listener) |
void |
runOnUiThread(Runnable runnable)
Method signifies an intent of the caller to execute some action on the UI Thread.
|
void |
setLogLevel(int logLevel) |
void |
useImmersiveMode(boolean use)
Activates Android 4.4 KitKat's 'Immersive Mode' feature.
|
dump, equals, getActivity, getArguments, getChildFragmentManager, getFragmentManager, getId, getLayoutInflater, getLoaderManager, getParentFragment, getResources, getRetainInstance, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityCreated, onContextItemSelected, onCreate, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onDestroyView, onHiddenChanged, onInflate, onLowMemory, onOptionsItemSelected, onOptionsMenuClosed, onPrepareOptionsMenu, onSaveInstanceState, onStart, onStop, onViewCreated, onViewStateRestored, registerForContextMenu, setArguments, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setRetainInstance, setTargetFragment, setUserVisibleHint, startActivity, startActivityForResult, toString, unregisterForContextMenustartActivitypublic void onAttach(android.app.Activity activity)
onAttach in class android.support.v4.app.Fragmentpublic void onDetach()
onDetach in class android.support.v4.app.Fragmentpublic void useImmersiveMode(boolean use)
AndroidApplicationBaseuseImmersiveMode in interface AndroidApplicationBaseuse - Whether or not to use immersive modepublic android.view.View initializeForView(ApplicationListener listener)
Fragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) method. It sets up all
the things necessary to get input, render via OpenGL and so on. Uses a default AndroidApplicationConfiguration.
Note: you have to return the returned view from the
Fragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)!listener - the ApplicationListener implementing the program logicpublic android.view.View initializeForView(ApplicationListener listener, AndroidApplicationConfiguration config)
Fragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle) method. It sets up all
the things necessary to get input, render via OpenGL and so on. You can configure other aspects of the application with the
rest of the fields in the AndroidApplicationConfiguration instance.
Note: you have to return the returned view from
Fragment.onCreateView(android.view.LayoutInflater, android.view.ViewGroup, android.os.Bundle)listener - the ApplicationListener implementing the program logicconfig - the AndroidApplicationConfiguration, defining various settings of the application (use accelerometer,
etc.).public void onPause()
onPause in class android.support.v4.app.Fragmentpublic void onResume()
onResume in class android.support.v4.app.Fragmentpublic ApplicationListener getApplicationListener()
getApplicationListener in interface Applicationpublic Audio getAudio()
getAudio in interface Applicationpublic Files getFiles()
getFiles in interface Applicationpublic Graphics getGraphics()
getGraphics in interface Applicationpublic AndroidInput getInput()
AndroidApplicationBaseAndroidInput object associated with this AndroidApplicationBasegetInput in interface ApplicationgetInput in interface AndroidApplicationBaseAndroidInput objectpublic Net getNet()
getNet in interface Applicationpublic Application.ApplicationType getType()
getType in interface Applicationpublic int getVersion()
getVersion in interface Applicationpublic long getJavaHeap()
getJavaHeap in interface Applicationpublic long getNativeHeap()
getNativeHeap in interface Applicationpublic Preferences getPreferences(String name)
getPreferences in interface Applicationpublic Clipboard getClipboard()
getClipboard in interface Applicationpublic void postRunnable(Runnable runnable)
postRunnable in interface Applicationpublic void onConfigurationChanged(android.content.res.Configuration config)
onConfigurationChanged in interface android.content.ComponentCallbacksonConfigurationChanged in class android.support.v4.app.Fragmentpublic void exit()
exit in interface Applicationpublic void debug(String tag, String message)
debug in interface Applicationpublic void debug(String tag, String message, Throwable exception)
debug in interface Applicationpublic void log(String tag, String message)
log in interface Applicationpublic void log(String tag, String message, Throwable exception)
log in interface Applicationpublic void error(String tag, String message)
error in interface Applicationpublic void error(String tag, String message, Throwable exception)
error in interface Applicationpublic void setLogLevel(int logLevel)
setLogLevel in interface Applicationpublic int getLogLevel()
getLogLevel in interface Applicationpublic void addLifecycleListener(LifecycleListener listener)
addLifecycleListener in interface Applicationpublic void removeLifecycleListener(LifecycleListener listener)
removeLifecycleListener in interface Applicationpublic android.content.Context getContext()
AndroidApplicationBasegetContext in interface AndroidApplicationBaseContextpublic Array<Runnable> getRunnables()
AndroidApplicationBasegetRunnables in interface AndroidApplicationBaseRunnable arraypublic Array<Runnable> getExecutedRunnables()
AndroidApplicationBasegetExecutedRunnables in interface AndroidApplicationBaseRunnable arraypublic void runOnUiThread(Runnable runnable)
AndroidApplicationBaserunOnUiThread in interface AndroidApplicationBaserunnable - The runnable to be executedpublic SnapshotArray<LifecycleListener> getLifecycleListeners()
AndroidApplicationBaseLifecycleListener array associated with this AndroidApplicationBasegetLifecycleListeners in interface AndroidApplicationBaseLifecycleListener'spublic void onActivityResult(int requestCode,
int resultCode,
android.content.Intent data)
onActivityResult in class android.support.v4.app.Fragmentpublic void addAndroidEventListener(AndroidEventListener listener)
public void removeAndroidEventListener(AndroidEventListener listener)
public android.view.Window getApplicationWindow()
AndroidApplicationBasegetApplicationWindow in interface AndroidApplicationBaseWindow associated with the applicationpublic android.os.Handler getHandler()
AndroidApplicationBasegetHandler in interface AndroidApplicationBaseHandler object created by the applicationpublic android.view.WindowManager getWindowManager()
AndroidApplicationBasegetWindowManager in interface AndroidApplicationBaseWindowManager associated with the applicationCopyright © 2016. All rights reserved.