Package com.evanv.taskapp.ui.additem
Class AddItem
- java.lang.Object
-
- Activity
-
- androidx.core.app.ComponentActivity
-
- androidx.activity.ComponentActivity
-
- androidx.fragment.app.FragmentActivity
-
- androidx.appcompat.app.AppCompatActivity
-
- com.evanv.taskapp.ui.additem.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
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
EXTRA_DUE
static java.lang.String
EXTRA_ECD
static java.lang.String
EXTRA_END
static java.lang.String
EXTRA_ITEM
static java.lang.String
EXTRA_NAME
static java.lang.String
EXTRA_PARENTS
static java.lang.String
EXTRA_RECUR
static java.lang.String
EXTRA_START
static java.lang.String
EXTRA_TYPE
static java.lang.String
EXTRA_VAL_EVENT
static java.lang.String
EXTRA_VAL_TASK
private boolean
ignoreCheckedChanged
private RadioGroup
mRGroup
private boolean
mTaskDisplayed
-
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
-
-
-
-
Field Detail
-
EXTRA_ITEM
public static final java.lang.String EXTRA_ITEM
- See Also:
- Constant Field Values
-
EXTRA_TYPE
public static final java.lang.String EXTRA_TYPE
- See Also:
- Constant Field Values
-
EXTRA_NAME
public static final java.lang.String EXTRA_NAME
- See Also:
- Constant Field Values
-
EXTRA_END
public static final java.lang.String EXTRA_END
- See Also:
- Constant Field Values
-
EXTRA_VAL_TASK
public static final java.lang.String EXTRA_VAL_TASK
- See Also:
- Constant Field Values
-
EXTRA_ECD
public static final java.lang.String EXTRA_ECD
- See Also:
- Constant Field Values
-
EXTRA_DUE
public static final java.lang.String EXTRA_DUE
- See Also:
- Constant Field Values
-
EXTRA_PARENTS
public static final java.lang.String EXTRA_PARENTS
- See Also:
- Constant Field Values
-
EXTRA_VAL_EVENT
public static final java.lang.String EXTRA_VAL_EVENT
- See Also:
- Constant Field Values
-
EXTRA_START
public static final java.lang.String EXTRA_START
- See Also:
- Constant Field Values
-
EXTRA_RECUR
public static final java.lang.String EXTRA_RECUR
- See Also:
- Constant Field Values
-
mTaskDisplayed
private boolean mTaskDisplayed
-
mRGroup
private RadioGroup mRGroup
-
ignoreCheckedChanged
private boolean ignoreCheckedChanged
-
-
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 classandroidx.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 classandroidx.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.
-
-