Class EditTaskFragment
- java.lang.Object
-
- androidx.fragment.app.Fragment
-
- androidx.fragment.app.DialogFragment
-
- androidx.appcompat.app.AppCompatDialogFragment
-
- com.google.android.material.bottomsheet.BottomSheetDialogFragment
-
- edu.cnm.deepdive.teamassignmentsandroid.controller.EditTaskFragment
-
- All Implemented Interfaces:
ComponentCallbacks
,DialogInterface.OnCancelListener
,DialogInterface.OnDismissListener
,NoCopySpan
,TextWatcher
,View.OnCreateContextMenuListener
,androidx.activity.result.ActivityResultCaller
,HasDefaultViewModelProviderFactory
,LifecycleOwner
,ViewModelStoreOwner
,SavedStateRegistryOwner
public class EditTaskFragment extends com.google.android.material.bottomsheet.BottomSheetDialogFragment implements TextWatcher
This fragment contains methods to get and make new tasks. It extends Bottom sheet dialog fragment to populate the bottom pop up.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class androidx.fragment.app.Fragment
Fragment.InstantiationException, Fragment.SavedState
-
Nested classes/interfaces inherited from interface android.text.NoCopySpan
NoCopySpan.Concrete
-
-
Field Summary
-
Fields inherited from class androidx.fragment.app.DialogFragment
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
-
-
Constructor Summary
Constructors Constructor Description EditTaskFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterTextChanged(Editable s)
This method is called to notify you that, somewhere within s, the text has been changed.void
beforeTextChanged(CharSequence s, int start, int count, int after)
This method is called to notify you that, within s, the count characters beginning at start are about to be replaced by new text with length after.void
onCreate(Bundle savedInstanceState)
requests group by id for user to add a taskDialog
onCreateDialog(Bundle savedInstanceState)
Creates the pop up dialog for task inputView
onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
Instantiates an XML layout.void
onTextChanged(CharSequence s, int start, int before, int count)
This method is called to notify you that, within s, the count characters beginning at start have just replaced old text that had length before.void
onViewCreated(View view, Bundle savedInstanceState)
Called immediately after onViewCreate.-
Methods inherited from class com.google.android.material.bottomsheet.BottomSheetDialogFragment
dismiss, dismissAllowingStateLoss
-
Methods inherited from class androidx.appcompat.app.AppCompatDialogFragment
setupDialog
-
Methods inherited from class androidx.fragment.app.DialogFragment
getDialog, getShowsDialog, getTheme, isCancelable, onAttach, onCancel, onDestroyView, onDetach, onDismiss, onGetLayoutInflater, onSaveInstanceState, onStart, onStop, onViewStateRestored, requireDialog, setCancelable, setShowsDialog, setStyle, show, show, showNow
-
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, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, 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
-
onCreate
public void onCreate(@Nullable Bundle savedInstanceState)
requests group by id for user to add a task- Overrides:
onCreate
in classDialogFragment
- Parameters:
savedInstanceState
- extends parcelable, allows instance to be written to
-
onCreateDialog
@NonNull public Dialog onCreateDialog(@Nullable Bundle savedInstanceState)
Creates the pop up dialog for task input- Overrides:
onCreateDialog
in classcom.google.android.material.bottomsheet.BottomSheetDialogFragment
- Parameters:
savedInstanceState
- extends parcelable, allows instance to be written to- Returns:
- the dialog
-
onCreateView
@Nullable public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState)
Instantiates an XML layout.- Overrides:
onCreateView
in classFragment
- Parameters:
inflater
- to inflate the layoutcontainer
- implements the view groupsavedInstanceState
- extends the base bundle- Returns:
- returns layout with on click listeners
-
onViewCreated
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState)
Called immediately after onViewCreate.- Overrides:
onViewCreated
in classFragment
- Parameters:
view
- expands the layout and widgetssavedInstanceState
- extends teh base bundle
-
beforeTextChanged
public void beforeTextChanged(CharSequence s, int start, int count, int after)
This method is called to notify you that, within s, the count characters beginning at start are about to be replaced by new text with length after.- Specified by:
beforeTextChanged
in interfaceTextWatcher
- Parameters:
s
- for char sequence of datastart
- the count characters beginning at startcount
- the count of charactersafter
- characters replaced by new text with length after
-
onTextChanged
public void onTextChanged(CharSequence s, int start, int before, int count)
This method is called to notify you that, within s, the count characters beginning at start have just replaced old text that had length before.- Specified by:
onTextChanged
in interfaceTextWatcher
- Parameters:
s
- for char sequence of datastart
- the count characters beginning at startbefore
- characters replaced old text that had length beforecount
- of characters
-
afterTextChanged
public void afterTextChanged(Editable s)
This method is called to notify you that, somewhere within s, the text has been changed.- Specified by:
afterTextChanged
in interfaceTextWatcher
- Parameters:
s
- for char sequence of data
-
-