Package com.xffffff.wellfed.ingredient
Class EditIngredientsFragment
- java.lang.Object
-
- androidx.fragment.app.Fragment
-
- com.xffffff.wellfed.common.EditRecyclerViewFragment<Ingredient>
-
- com.xffffff.wellfed.ingredient.EditIngredientsFragment
-
- 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<Ingredient>
,EditItemAdapter.OnEditListener<Ingredient>
public class EditIngredientsFragment extends EditRecyclerViewFragment<Ingredient>
The EditRecipeIngredientsFragment class is the fragment that allows the user to edit the ingredients of a recipe.
-
-
Constructor Summary
Constructors Constructor Description EditIngredientsFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description android.content.Intent
createOnEditIntent(Ingredient item)
createOnEditIntent creates an intent to edit an ingredient.android.content.Intent
createOnSearchIntent(Ingredient item)
createOnAddIntent creates an intent to add an ingredient.void
onSearchActivityResult(android.util.Pair<java.lang.String,Ingredient> result)
onSearchActivityResult is called when the user returns from the search activity.-
Methods inherited from class com.xffffff.wellfed.common.EditRecyclerViewFragment
add, hasChanged, onCreateView, onDelete, onEdit, onSearch, setAdapter, setTitle
-
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
-
-
-
-
Method Detail
-
createOnEditIntent
public android.content.Intent createOnEditIntent(Ingredient item)
createOnEditIntent creates an intent to edit an ingredient.- Specified by:
createOnEditIntent
in classEditRecyclerViewFragment<Ingredient>
- Parameters:
item
- The ingredient to edit.- Returns:
- The intent to edit the ingredient.
-
createOnSearchIntent
public android.content.Intent createOnSearchIntent(Ingredient item)
createOnAddIntent creates an intent to add an ingredient.- Specified by:
createOnSearchIntent
in classEditRecyclerViewFragment<Ingredient>
- Parameters:
item
- the item to search- Returns:
- The intent to add an ingredient.
-
onSearchActivityResult
public void onSearchActivityResult(android.util.Pair<java.lang.String,Ingredient> result)
onSearchActivityResult is called when the user returns from the search activity. It allows the user to add an ingredient to the recipe or quit the activity.- Specified by:
onSearchActivityResult
in classEditRecyclerViewFragment<Ingredient>
- Parameters:
result
- The result of the search activity.
-
-