Class AllRecordsFragment

java.lang.Object
androidx.fragment.app.Fragment
com.example.cardiacrecorder.AllRecordsFragment
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 AllRecordsFragment extends androidx.fragment.app.Fragment
  • 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    android.view.View
    onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
    sets up the RecyclerView to display the user's records in descending order based on the timestamp.
    void
    Called when the fragment is visible to the user and actively running.
    void
    Called when the fragment is visible to the user and actively running.
    void
    Called when the fragment is no longer visible to the user and not actively running.
    void
    onViewCreated(android.view.View view, android.os.Bundle savedInstanceState)
     

    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, 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, onSaveInstanceState, 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

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AllRecordsFragment

      public AllRecordsFragment()
  • Method Details

    • onCreateView

      public android.view.View onCreateView(@NonNull android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
      sets up the RecyclerView to display the user's records in descending order based on the timestamp. If the user is not authenticated (not logged in), the "createRecordFabBtn" button will direct the user to the RegisterActivity to sign in or register. Otherwise, it will direct the user to the CreateNote activity to create a new record.
      Overrides:
      onCreateView in class androidx.fragment.app.Fragment
      Parameters:
      inflater - The LayoutInflater object that can be used to inflate any views in the fragment,
      container - 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:
    • onStart

      public void onStart()
      Called when the fragment is visible to the user and actively running. Starts listening for data changes in the recordAdapter to update the RecyclerView.
      Overrides:
      onStart in class androidx.fragment.app.Fragment
    • onStop

      public void onStop()
      Called when the fragment is no longer visible to the user and not actively running. Stops listening for data changes in the recordAdapter to release resources.
      Overrides:
      onStop in class androidx.fragment.app.Fragment
    • onResume

      public void onResume()
      Called when the fragment is visible to the user and actively running. Notifies the recordAdapter of any data set changes to update the UI.
      Overrides:
      onResume in class androidx.fragment.app.Fragment
    • onViewCreated

      public void onViewCreated(@NonNull android.view.View view, @Nullable android.os.Bundle savedInstanceState)
      Overrides:
      onViewCreated in class androidx.fragment.app.Fragment