Class TipFragment

  • 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

    public class TipFragment
    extends androidx.fragment.app.Fragment
    Created by jakub on 23/08/2017.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class androidx.fragment.app.Fragment

        androidx.fragment.app.Fragment.InstantiationException, androidx.fragment.app.Fragment.SavedState
    • Constructor Summary

      Constructors 
      Constructor Description
      TipFragment()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static android.view.View createView​(android.view.LayoutInflater inflater, android.view.ViewGroup container, int tipIndex, IStringTranslator translator)  
      static android.view.View createView​(android.view.LayoutInflater inflater, android.view.ViewGroup container, int imgSrc, java.lang.String text)  
      static TipFragment newInstance​(int tipIndex)  
      void onAttach​(android.content.Context context)
      Called when a fragment is first attached to its context.
      android.view.View onCreateView​(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
      Called to have the fragment instantiate its user interface view.
      void onDetach()
      Called when the fragment is no longer attached to its activity.
      • Methods inherited from class androidx.fragment.app.Fragment

        dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDestroyView, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onSaveInstanceState, onStart, onStop, onViewCreated, onViewStateRestored, postponeEnterTransition, postponeEnterTransition, registerForActivityResult, 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, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface androidx.lifecycle.HasDefaultViewModelProviderFactory

        getDefaultViewModelCreationExtras
    • Constructor Detail

      • TipFragment

        public TipFragment()
    • Method Detail

      • newInstance

        public static TipFragment newInstance​(int tipIndex)
      • createView

        public static android.view.View createView​(android.view.LayoutInflater inflater,
                                                   android.view.ViewGroup container,
                                                   int tipIndex,
                                                   IStringTranslator translator)
      • createView

        public static android.view.View createView​(android.view.LayoutInflater inflater,
                                                   android.view.ViewGroup container,
                                                   @DrawableRes
                                                   int imgSrc,
                                                   java.lang.String text)
      • onCreateView

        @Nullable
        public android.view.View onCreateView​(@NonNull
                                              android.view.LayoutInflater inflater,
                                              @Nullable
                                              android.view.ViewGroup container,
                                              @Nullable
                                              android.os.Bundle savedInstanceState)
        Description copied from class: androidx.fragment.app.Fragment
        Called to have the fragment instantiate its user interface view. This is optional, and non-graphical fragments can return null. This will be called between Fragment.onCreate(Bundle) and Fragment.onViewCreated(View, Bundle).

        A default View can be returned by calling Fragment(int) in your constructor. Otherwise, this method returns null.

        It is recommended to only inflate the layout in this method and move logic that operates on the returned View to Fragment.onViewCreated(View, Bundle).

        If you return a View from here, you will later be called in Fragment.onDestroyView() when the view is being released.

        Overrides:
        onCreateView in class androidx.fragment.app.Fragment
        Parameters:
        inflater - The LayoutInflater object that can be used to inflate any views in the fragment,
        container - If non-null, this is the parent view that the fragment's UI should be attached to. The fragment should not add the view itself, but this can be used to generate the LayoutParams of the view.
        savedInstanceState - If non-null, this fragment is being re-constructed from a previous saved state as given here.
        Returns:
        Return the View for the fragment's UI, or null.
      • onAttach

        public void onAttach​(@NonNull
                             android.content.Context context)
        Description copied from class: androidx.fragment.app.Fragment
        Called when a fragment is first attached to its context. Fragment.onCreate(Bundle) will be called after this.
        Overrides:
        onAttach in class androidx.fragment.app.Fragment
      • onDetach

        public void onDetach()
        Description copied from class: androidx.fragment.app.Fragment
        Called when the fragment is no longer attached to its activity. This is called after Fragment.onDestroy().
        Overrides:
        onDetach in class androidx.fragment.app.Fragment