This will be the menu on the toolbar which allows the user to modify existing modules Next add a new resource directory called 'menu' to the res folder.Setup view binding for this activity also.Switch to the corresponding Kotlin file and add methods for both buttons' onClick values (each taking a parameter of type View), with no implementation.The final button should have an id of "btnAdd" and an onClick value of "addAssignment".Add an attribute named "android:datePickerMode" to the DatePicker and set its value to "spinner".The id of the DatePicker should be 'datePicker'.The Weight Edit text should be configured with the 'number' input type.The ids for the EditText elements should be 'etTitle' and 'etWeight' respectively.The first button does not need an id, but should have an onClick value of "addModule".The id for the Spinner should be 'spinner'.This will be used to add a new assignment deadlineĪdd the following elements to the screen, laying them out as shown: Spinner, Button, EditText, EditText, DatePicker, Button Add another empty activity called AssignmentDetailsActivity.In onCreate set an onClickListener for the button to it calls the addModule method.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |