Package com.xffffff.wellfed.common
Class SortingFragment
- java.lang.Object
-
- androidx.fragment.app.Fragment
-
- com.xffffff.wellfed.common.SortingFragment
-
- 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 SortingFragment extends androidx.fragment.app.Fragment
The SortingFragment class is a fragment that displays a list of sorting options for the user to select from.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SortingFragment.OnSortClick
OnSortClick is the interface for the onSortClick listener
-
Constructor Summary
Constructors Constructor Description SortingFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description android.view.View
onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
onCreateView inflates the viewvoid
onViewCreated(android.view.View view, android.os.Bundle savedInstanceState)
onViewCreated sets up the viewvoid
setListener(SortingFragment.OnSortClick listener)
setListener sets the onSortClick listener for the fragmentvoid
setOptions(java.util.List<java.lang.String> sortingOptions, java.util.List<java.lang.String> readableSortOptions)
setOptions sets the list of sorting options-
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
-
-
-
-
Method Detail
-
setOptions
public void setOptions(java.util.List<java.lang.String> sortingOptions, java.util.List<java.lang.String> readableSortOptions)
setOptions sets the list of sorting options- Parameters:
sortingOptions
- the list of sorting optionsreadableSortOptions
- the list of readable sorting options
-
setListener
public void setListener(SortingFragment.OnSortClick listener)
setListener sets the onSortClick listener for the fragment- Parameters:
listener
- the onSortClick listener
-
onCreateView
@Nullable public android.view.View onCreateView(@NonNull android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup container, @Nullable android.os.Bundle savedInstanceState)
onCreateView inflates the view- Overrides:
onCreateView
in classandroidx.fragment.app.Fragment
- Parameters:
inflater
- the inflatercontainer
- the containersavedInstanceState
- the saved instance state- Returns:
- the view
-
onViewCreated
public void onViewCreated(@NonNull android.view.View view, @Nullable android.os.Bundle savedInstanceState)
onViewCreated sets up the view- Overrides:
onViewCreated
in classandroidx.fragment.app.Fragment
- Parameters:
view
- the viewsavedInstanceState
- the saved instance state
-
-