Class InboxFragment
java.lang.Object
androidx.fragment.app.Fragment
com.example.slacks_lottoevent.view.fragment.InboxFragment
- 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 InboxFragment
extends androidx.fragment.app.Fragment
A fragment that displays event invitations and other notifications for the user.
The user can see both selected and unselected event notifications/invitations and manage notification settings.
-
Nested Class Summary
Nested classes/interfaces inherited from class androidx.fragment.app.Fragment
androidx.fragment.app.Fragment.InstantiationException, androidx.fragment.app.Fragment.SavedState
-
Field Summary
Fields inherited from class androidx.fragment.app.Fragment
mPreviousWho
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic InboxFragment
void
onActivityResult
(int requestCode, int resultCode, android.content.Intent data) Handles the result from the notification settings activity.android.view.View
onCreateView
(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) Inflates the layout for the fragmentvoid
onViewCreated
(android.view.View view, android.os.Bundle savedInstanceState) Sets up UI elements, initializes Firestore collections, and fetches user invitations.Methods inherited from class androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelCreationExtras, 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, 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
-
Constructor Details
-
InboxFragment
public InboxFragment()
-
-
Method Details
-
newInstance
-
onCreateView
public android.view.View onCreateView(@NonNull android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState) Inflates the layout for the fragment- Overrides:
onCreateView
in classandroidx.fragment.app.Fragment
- Parameters:
inflater
- The LayoutInflanter object used to inflate views in the fragment.container
- parent view that the fragment's UI should be attached to.savedInstanceState
- fragment is being re-constructed from a previous saved state.- Returns:
- The View for the fragment's UI.
-
onViewCreated
public void onViewCreated(@NonNull android.view.View view, @Nullable android.os.Bundle savedInstanceState) Sets up UI elements, initializes Firestore collections, and fetches user invitations.- Overrides:
onViewCreated
in classandroidx.fragment.app.Fragment
- Parameters:
view
- The View returned by onCreateView.savedInstanceState
- If non-null, this fragment is being re-constructed from a previous saved state.
-
onActivityResult
public void onActivityResult(int requestCode, int resultCode, android.content.Intent data) Handles the result from the notification settings activity. Updates the notification icon and shared preferences based on the current status.- Overrides:
onActivityResult
in classandroidx.fragment.app.Fragment
- Parameters:
requestCode
- The request code used when starting the activity.resultCode
- The result code returned by the activity.data
- Any additional data returned by the activity.
-