Package 

Class AndroidFragmentApplication

  • All Implemented Interfaces:
    android.content.ComponentCallbacks , android.view.View.OnCreateContextMenuListener , androidx.activity.result.ActivityResultCaller , androidx.lifecycle.HasDefaultViewModelProviderFactory , androidx.lifecycle.LifecycleOwner , androidx.lifecycle.ViewModelStoreOwner , androidx.savedstate.SavedStateRegistryOwner , com.badlogic.gdx.Application , com.badlogic.gdx.backends.android.AndroidApplicationBase

    
    public class AndroidFragmentApplication
    extends Fragment implements AndroidApplicationBase
                        

    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

      Nested Classes 
      Modifier and Type Class Description
      public interface AndroidFragmentApplication.Callbacks

      Callbacks interface for letting the fragment interact with the Activitiy, parent fragment or target fragment.

    • Method Summary

      Modifier and Type Method Description
      AndroidInput getInput() Returns the AndroidInput object associated with this AndroidApplicationBase
      Handler getHandler() Returns the Handler object created by the application
      Array<Runnable> getRunnables() A set of usable runnables
      Array<Runnable> getExecutedRunnables() The currently executed runnables
      SnapshotArray<LifecycleListener> getLifecycleListeners() Returns the LifecycleListener array associated with this AndroidApplicationBase
      int getLogLevel()
      void setLogLevel(int logLevel)
      ApplicationLogger getApplicationLogger()
      void setApplicationLogger(ApplicationLogger applicationLogger)
      void onAttach(Activity activity)
      void onDetach()
      void useImmersiveMode(boolean use) Activates Android 4.4 KitKat's 'Immersive Mode' feature.
      View initializeForView(ApplicationListener listener) This method has to be called in the onCreateView method.
      View initializeForView(ApplicationListener listener, AndroidApplicationConfiguration config) This method has to be called in the onCreateView method.
      void onPause()
      void onResume()
      ApplicationListener getApplicationListener()
      Application.ApplicationType getType()
      int getVersion()
      long getJavaHeap()
      long getNativeHeap()
      Preferences getPreferences(String name)
      void postRunnable(Runnable runnable)
      void onConfigurationChanged(Configuration config)
      void exit()
      void debug(String tag, String message)
      void debug(String tag, String message, Throwable exception)
      void log(String tag, String message)
      void log(String tag, String message, Throwable exception)
      void error(String tag, String message)
      void error(String tag, String message, Throwable exception)
      void addLifecycleListener(LifecycleListener listener)
      void removeLifecycleListener(LifecycleListener listener)
      Context getContext()
      void runOnUiThread(Runnable runnable) Method signifies an intent of the caller to execute some action on the UI Thread.
      void onActivityResult(int requestCode, int resultCode, Intent data)
      void addAndroidEventListener(AndroidEventListener listener) Adds an event listener for Android specific event such as onActivityResult(...).
      void removeAndroidEventListener(AndroidEventListener listener) Removes an event listener for Android specific event such as onActivityResult(...).
      Window getApplicationWindow() Returns the Window associated with the application
      AndroidAudio createAudio(Context context, AndroidApplicationConfiguration config) Returns the AndroidAudio to be used by the application
      AndroidInput createInput(Application activity, Context context, Object view, AndroidApplicationConfiguration config) Returns the AndroidInput to be used by the application
      WindowManager getWindowManager() Returns the WindowManager associated with the application
      • Methods inherited from class androidx.fragment.app.Fragment

        dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelCreationExtras, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hasOptionsMenu, hashCode, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onDestroyView, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onSaveInstanceState, onStart, onStop, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForActivityResult, registerForContextMenu, requestPermissions, requireActivity, requireArguments, requireContext, requireFragmentManager, requireHost, requireParentFragment, requireView, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
      • Methods inherited from class com.badlogic.gdx.backends.android.AndroidApplicationBase

        startActivity, useImmersiveMode
      • 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