Class AddItem

  • All Implemented Interfaces:
    androidx.activity.contextaware.ContextAware, androidx.activity.OnBackPressedDispatcherOwner, androidx.activity.result.ActivityResultCaller, androidx.activity.result.ActivityResultRegistryOwner, androidx.appcompat.app.ActionBarDrawerToggle.DelegateProvider, androidx.appcompat.app.AppCompatCallback, androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback, androidx.core.app.ActivityCompat.RequestPermissionsRequestCodeValidator, androidx.core.app.OnMultiWindowModeChangedProvider, androidx.core.app.OnNewIntentProvider, androidx.core.app.OnPictureInPictureModeChangedProvider, androidx.core.app.TaskStackBuilder.SupportParentable, androidx.core.content.OnConfigurationChangedProvider, androidx.core.content.OnTrimMemoryProvider, androidx.core.view.KeyEventDispatcher.Component, androidx.core.view.MenuHost, androidx.lifecycle.HasDefaultViewModelProviderFactory, androidx.lifecycle.LifecycleOwner, androidx.lifecycle.ViewModelStoreOwner, androidx.savedstate.SavedStateRegistryOwner

    public class AddItem
    extends androidx.appcompat.app.AppCompatActivity
    Class for the AddItem activity. Gets fields for a new Task/Event to be added in MainActivity
    Author:
    Evan Voogd
    • Nested Class Summary

      • Nested classes/interfaces inherited from class androidx.core.app.ComponentActivity

        androidx.core.app.ComponentActivity.ExtraData
    • Constructor Summary

      Constructors 
      Constructor Description
      AddItem()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onBackPressed()
      When back button is pressed, change views that are impacted by the change in fragment to have the correct values.
      protected void onCreate​(Bundle savedInstanceState)
      Runs when Activity starts.
      protected void submit()
      Submits the data in the fields to the MainActivity if all fields are filled.
      • Methods inherited from class androidx.appcompat.app.AppCompatActivity

        addContentView, attachBaseContext, closeOptionsMenu, dispatchKeyEvent, findViewById, getDelegate, getDrawerToggleDelegate, getMenuInflater, getResources, getSupportActionBar, getSupportParentActivityIntent, invalidateOptionsMenu, onConfigurationChanged, onContentChanged, onCreateSupportNavigateUpTaskStack, onDestroy, onKeyDown, onMenuItemSelected, onMenuOpened, onNightModeChanged, onPanelClosed, onPostCreate, onPostResume, onPrepareSupportNavigateUpTaskStack, onStart, onStop, onSupportActionModeFinished, onSupportActionModeStarted, onSupportContentChanged, onSupportNavigateUp, onTitleChanged, onWindowStartingSupportActionMode, openOptionsMenu, setContentView, setContentView, setContentView, setSupportActionBar, setSupportProgress, setSupportProgressBarIndeterminate, setSupportProgressBarIndeterminateVisibility, setSupportProgressBarVisibility, setTheme, startSupportActionMode, supportInvalidateOptionsMenu, supportNavigateUpTo, supportRequestWindowFeature, supportShouldUpRecreateTask
      • Methods inherited from class androidx.fragment.app.FragmentActivity

        dump, getSupportFragmentManager, getSupportLoaderManager, onActivityResult, onAttachFragment, onCreateView, onCreateView, onPause, onRequestPermissionsResult, onResume, onResumeFragments, onStateNotSaved, setEnterSharedElementCallback, setExitSharedElementCallback, startActivityFromFragment, startActivityFromFragment, startIntentSenderFromFragment, supportFinishAfterTransition, supportPostponeEnterTransition, supportStartPostponedEnterTransition, validateRequestPermissionsRequestCode
      • Methods inherited from class androidx.activity.ComponentActivity

        addMenuProvider, addMenuProvider, addMenuProvider, addOnConfigurationChangedListener, addOnContextAvailableListener, addOnMultiWindowModeChangedListener, addOnNewIntentListener, addOnPictureInPictureModeChangedListener, addOnTrimMemoryListener, getActivityResultRegistry, getDefaultViewModelCreationExtras, getDefaultViewModelProviderFactory, getLastCustomNonConfigurationInstance, getLifecycle, getOnBackPressedDispatcher, getSavedStateRegistry, getViewModelStore, invalidateMenu, onCreatePanelMenu, onMultiWindowModeChanged, onMultiWindowModeChanged, onNewIntent, onPictureInPictureModeChanged, onPictureInPictureModeChanged, onPreparePanel, onRetainCustomNonConfigurationInstance, onRetainNonConfigurationInstance, onSaveInstanceState, onTrimMemory, peekAvailableContext, registerForActivityResult, registerForActivityResult, removeMenuProvider, removeOnConfigurationChangedListener, removeOnContextAvailableListener, removeOnMultiWindowModeChangedListener, removeOnNewIntentListener, removeOnPictureInPictureModeChangedListener, removeOnTrimMemoryListener, reportFullyDrawn, startActivityForResult, startActivityForResult, startIntentSenderForResult, startIntentSenderForResult
      • Methods inherited from class androidx.core.app.ComponentActivity

        dispatchKeyShortcutEvent, getExtraData, putExtraData, shouldDumpInternalState, superDispatchKeyEvent
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AddItem

        public AddItem()
    • Method Detail

      • onBackPressed

        public void onBackPressed()
        When back button is pressed, change views that are impacted by the change in fragment to have the correct values.
        Overrides:
        onBackPressed in class androidx.activity.ComponentActivity
        See Also:
        ComponentActivity.getOnBackPressedDispatcher()
      • onCreate

        protected void onCreate​(Bundle savedInstanceState)
        Runs when Activity starts. Most importantly initializes the fragments and sets up the radio group to change fragment when a different task/event is selected.
        Overrides:
        onCreate in class androidx.fragment.app.FragmentActivity
        Parameters:
        savedInstanceState - not used
      • submit

        protected void submit()
        Submits the data in the fields to the MainActivity if all fields are filled.