Class RecipeBookFragment

    • Nested Class Summary

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void launch​(Recipe recipe)
      launches activity for a RecipeRecipe in the recipes at pos.
      void onClick​(java.lang.String field)
      onClick method for the RecipeAdapter RecipeAdapter
      android.view.View onCreateView​(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
      method that is called upon creation of view initializes the variables such as recipes recipes recipeController recipeController
      void onViewCreated​(android.view.View view, android.os.Bundle savedInstanceState)
      method that is called when the view is created
      • 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, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDestroyView, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onSaveInstanceState, onStart, onStop, 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
    • Field Detail

      • recipes

        java.util.ArrayList<Recipe> recipes
        Recipes contains a list of Recipes Recipe
      • recipeLauncher

        androidx.activity.result.ActivityResultLauncher<Recipe> recipeLauncher
        Launcher that launches an RecipeActivity RecipeActivity
      • recipeEditLauncher

        androidx.activity.result.ActivityResultLauncher<Recipe> recipeEditLauncher
        Launcher that launches RecipeEditActivity RecipeEditActivity
    • Constructor Detail

      • RecipeBookFragment

        public RecipeBookFragment()
    • Method Detail

      • onCreateView

        @Nullable
        public android.view.View onCreateView​(@NonNull
                                              android.view.LayoutInflater inflater,
                                              @Nullable
                                              android.view.ViewGroup container,
                                              @Nullable
                                              android.os.Bundle savedInstanceState)
        method that is called upon creation of view initializes the variables such as recipes recipes recipeController recipeController
        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:
        inflated view of the fragment View
      • onViewCreated

        public void onViewCreated​(@NonNull
                                  android.view.View view,
                                  @Nullable
                                  android.os.Bundle savedInstanceState)
        method that is called when the view is created
        Overrides:
        onViewCreated in class androidx.fragment.app.Fragment
        Parameters:
        view - the View returned by onCreateView (LayoutInflater, ViewGroup, Bundle)
        savedInstanceState - if non-null, this fragment is being re-constructed from a previous saved state as given here.