Class EditRecipesFragment

  • 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, EditItemAdapter.OnDeleteListener<Recipe>, EditItemAdapter.OnEditListener<Recipe>

    public class EditRecipesFragment
    extends EditRecyclerViewFragment<Recipe>
    EditRecipesFragment class. It is the fragment that allows the user to edit the recipes.
    • 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
      android.content.Intent createOnEditIntent​(Recipe item)
      createOnEditIntent creates an intent to edit a recipe.
      android.content.Intent createOnSearchIntent​(Recipe item)
      createOnSearchIntent creates an intent to add a recipe.
      void onSearchActivityResult​(android.util.Pair<java.lang.String,​Recipe> result)
      onSearchActivityResult is called when the user returns from the search
      • 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, 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

      • EditRecipesFragment

        public EditRecipesFragment()
    • Method Detail

      • createOnEditIntent

        public android.content.Intent createOnEditIntent​(Recipe item)
        createOnEditIntent creates an intent to edit a recipe.
        Specified by:
        createOnEditIntent in class EditRecyclerViewFragment<Recipe>
        Parameters:
        item - The recipe to edit.
        Returns:
        The intent to edit the recipe.
      • createOnSearchIntent

        public android.content.Intent createOnSearchIntent​(Recipe item)
        createOnSearchIntent creates an intent to add a recipe.
        Specified by:
        createOnSearchIntent in class EditRecyclerViewFragment<Recipe>
        Parameters:
        item - The recipe to add.
        Returns:
        The intent to add a recipe.
      • onSearchActivityResult

        public void onSearchActivityResult​(android.util.Pair<java.lang.String,​Recipe> result)
        onSearchActivityResult is called when the user returns from the search
        Specified by:
        onSearchActivityResult in class EditRecyclerViewFragment<Recipe>
        Parameters:
        result - The result of the search activity.