Package com.xffffff.wellfed.recipe
Class RecipeBookFragment
- java.lang.Object
-
- androidx.fragment.app.Fragment
-
- com.xffffff.wellfed.recipe.RecipeBookFragment
-
- 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,Launcher<Recipe>,SortingFragment.OnSortClick,RecipeAdapter.RecipeLauncher
- Direct Known Subclasses:
RecipeBookSelectFragment
public class RecipeBookFragment extends androidx.fragment.app.Fragment implements Launcher<Recipe>, RecipeAdapter.RecipeLauncher, SortingFragment.OnSortClick
RecipeBookFragment displays a list of RecipesRecipe
-
-
Field Summary
Fields Modifier and Type Field Description (package private) androidx.activity.result.ActivityResultLauncher<Recipe>recipeEditLauncherLauncher that launches RecipeEditActivityRecipeEditActivity(package private) androidx.activity.result.ActivityResultLauncher<Recipe>recipeLauncherLauncher that launches an RecipeActivityRecipeActivity(package private) java.util.ArrayList<Recipe>recipesRecipes contains a list of RecipesRecipe
-
Constructor Summary
Constructors Constructor Description RecipeBookFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidlaunch(Recipe recipe)launches activity for a RecipeRecipein the recipes at pos.voidonClick(java.lang.String field)onClick method for the RecipeAdapterRecipeAdapterandroid.view.ViewonCreateView(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 recipesrecipesrecipeControllerrecipeControllervoidonViewCreated(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
-
-
-
-
Field Detail
-
recipeLauncher
androidx.activity.result.ActivityResultLauncher<Recipe> recipeLauncher
Launcher that launches an RecipeActivityRecipeActivity
-
recipeEditLauncher
androidx.activity.result.ActivityResultLauncher<Recipe> recipeEditLauncher
Launcher that launches RecipeEditActivityRecipeEditActivity
-
-
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 recipesrecipesrecipeControllerrecipeController- Overrides:
onCreateViewin classandroidx.fragment.app.Fragment- Parameters:
inflater- the LayoutInflater object that can be used to inflate any views in the fragmentcontainer- 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:
onViewCreatedin classandroidx.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.
-
launch
public void launch(Recipe recipe)
launches activity for a RecipeRecipein the recipes at pos.- Specified by:
launchin interfaceLauncher<Recipe>- Specified by:
launchin interfaceRecipeAdapter.RecipeLauncher- Parameters:
recipe- the item
-
onClick
public void onClick(java.lang.String field)
onClick method for the RecipeAdapterRecipeAdapter- Specified by:
onClickin interfaceSortingFragment.OnSortClick- Parameters:
field- the field that was clicked
-
-