Now you will need to add some widgets to the view so that when adding a new student, you can get the class standing from the user. Open the content_edit_student.xml file.
You will see that the dialog is laid out in a Relative layout with labels and input fields. You will need to add to the layout some way to input the class standing. I used a spinner, but 4 radio buttons would work. You could use a text field and type in the standing, but that is error prone and you would need to validate that an incorrect entry was not made.
Once you have made the changes to the screen be sure and save the .xml file.
Now you should be able to run the app again, just to make sure everything is ok. You should be able to hit the add student button and your dialog should pop up with your new UI features showing. It wont actually do anything yet, and if you used a combobox like me, it won't have any values in it. To make the display actually work, we have to edit one more class, the EditStudentActivity (which is acting as our controller).
Now you will need to add some widgets to the view so that when adding a new student, you can get the class standing from the user. Open the content_edit_student.xml file.
You will see that the dialog is laid out in a Relative layout with labels and input fields. You will need to add to the layout some way to input the class standing. I used a spinner, but 4 radio buttons would work. You could use a text field and type in the standing, but that is error prone and you would need to validate that an incorrect entry was not made.
Once you have made the changes to the screen be sure and save the .xml file.
Now you should be able to run the app again, just to make sure everything is ok. You should be able to hit the add student button and your dialog should pop up with your new UI features showing. It wont actually do anything yet, and if you used a combobox like me, it won't have any values in it. To make the display actually work, we have to edit one more class, the EditStudentActivity (which is acting as our controller).