![]() This will act as a context menu for list of deadlines displayed in a ListView in the main activity Add another menu resource (in the same folder) called menu_deadlines_context.Within the newly added file add a single menu item with the title "Edit Modules" and the id "menu_edit_modules".Add a new menu resource file within that new folder called menu_settings.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.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.Return to the XML file and verify the error no longer appears. Switch to the corresponding Kotlin file for the activity, and add add an empty function called addModule which takes a single parameter of type View.Add an onClick attribute for the button and set the value to "addModule" (this will shown an error at first).Set the text view to the full with of the activity (Again with an 8dp margin).Set the text size for each of the edit text elements to 18sp, and set them to the full width of the activity (with a 8dp margin all round).An EditText with the id of 'etTitle', and the hint as "Module Name" (again make it a String resource).CO5225" (convert the String to a String resource) An EditText with the id of 'etCode', and the hint as "Module Code e.g.The layout for this should consist of the following elements, one below each other in the following order:.This will be used to add and edit the details relating to an individual module Add a new empty activity named ModuleDetailActivity. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |