The assignment will add a further condition to the Dialog Project that we applied together in the lab at the end of the day. Thus, the starting point will be from the last thing that we did in Dialog Project.
Note: If you miss some piece of the code through following the lab, you can find the latest version of the Dialog Project in this assignment.
- You must add TextView in Register screen for gender where when the user click on TextView the Dialog shown and ask user to select one of two choice
male/female
and show the item selected in the same TextView.
Note : you can use a
Spinner
for select gender instead of Dialog.
-
When the user click on send button will go to another fragment that will display all info that the user entered in the register screen instead of showing in the same screen.
-
To do this part you need to modify:
- create two fragments named
MainFragment
andInfoFragment
.MainFragment
represent Register screen, that means all code inMainActivity
andactivity_main.xml
will be in this fragment with it’s layout.InfoFragment
is for displaying the entered information. - change code in
MainActiviy
and it’s layout to can add/replace fragment. - When click on
send button
inMainFragment
It will send all info that user entered toInfoFragment
to display it.
- create two fragments named