|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.support.v4.app.Fragment
com.badlogic.gdx.backends.android.AndroidFragmentApplication
public class AndroidFragmentApplication
Implementation of the AndroidApplicationBase that is based on the Fragment class. This class is similar in use
to the AndroidApplication class, which is based on an Activity.
| Nested Class Summary | |
|---|---|
static interface |
AndroidFragmentApplication.Callbacks
Callbacks interface for letting the fragment interact with the Activitiy, parent fragment or target fragment. |
| Nested classes/interfaces inherited from class android.support.v4.app.Fragment |
|---|
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState |
| Nested classes/interfaces inherited from interface com.badlogic.gdx.Application |
|---|
Application.ApplicationType |
| Field Summary | |
|---|---|
android.os.Handler |
handler
|
| Fields inherited from interface com.badlogic.gdx.backends.android.AndroidApplicationBase |
|---|
MINIMUM_SDK |
| Fields inherited from interface com.badlogic.gdx.Application |
|---|
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_NONE |
| Constructor Summary | |
|---|---|
AndroidFragmentApplication()
|
|
| Method Summary | |
|---|---|
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()
|
Array<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 |
onAttach(android.app.Activity activity)
|
void |
onConfigurationChanged(android.content.res.Configuration config)
|
void |
onDetach()
|
void |
onPause()
|
void |
onResume()
|
void |
postRunnable(Runnable runnable)
|
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. |
| Methods inherited from class android.support.v4.app.Fragment |
|---|
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, onActivityResult, 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, unregisterForContextMenu |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.badlogic.gdx.backends.android.AndroidApplicationBase |
|---|
startActivity |
| Field Detail |
|---|
public android.os.Handler handler
| Constructor Detail |
|---|
public AndroidFragmentApplication()
| Method Detail |
|---|
public 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)
AndroidApplicationBase
useImmersiveMode 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 logic
public 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 AndroidApplicationBase
getInput 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 Application
public void debug(String tag,
String message)
debug in interface Application
public void debug(String tag,
String message,
Throwable exception)
debug in interface Application
public void log(String tag,
String message)
log in interface Application
public void log(String tag,
String message,
Throwable exception)
log in interface Application
public void error(String tag,
String message)
error in interface Application
public 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()
AndroidApplicationBase
getContext in interface AndroidApplicationBaseContextpublic Array<Runnable> getRunnables()
AndroidApplicationBase
getRunnables in interface AndroidApplicationBaseRunnable arraypublic Array<Runnable> getExecutedRunnables()
AndroidApplicationBase
getExecutedRunnables in interface AndroidApplicationBaseRunnable arraypublic void runOnUiThread(Runnable runnable)
AndroidApplicationBase
runOnUiThread in interface AndroidApplicationBaserunnable - The runnable to be executedpublic Array<LifecycleListener> getLifecycleListeners()
AndroidApplicationBaseLifecycleListener array associated with this AndroidApplicationBase
getLifecycleListeners in interface AndroidApplicationBaseLifecycleListener'spublic android.view.Window getApplicationWindow()
AndroidApplicationBase
getApplicationWindow in interface AndroidApplicationBaseWindow associated with the applicationpublic android.os.Handler getHandler()
AndroidApplicationBase
getHandler in interface AndroidApplicationBaseHandler object created by the applicationpublic android.view.WindowManager getWindowManager()
AndroidApplicationBase
getWindowManager in interface AndroidApplicationBaseWindowManager associated with the application
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||