Due: Thursday April 9, 11:59pm
Submission instructions: Submit to this CrowdGrader assignment.
You need to build a phone dialer, which should look more or less like this (you can make it prettier!).
The behavior is as follows.
As a starting point, we recommend that you clone this project: https://bitbucket.org/luca_de_alfaro/cmps121_2015_hw1 . You can also start from scratch of course, but why not?
The buttons have to look like buttons, but you don't have to obsess about making the number display area look super fancy. Just make the numbers readable.
Note a couple of things about this project:
android:onClick="clickButton"
for all such buttons in activity_main.xml
. Note that for DEL and CALL, you will instead need to write two separate functions, which you can call for instance clickDel
and clickCall
. TableLayout
, together with android:stetchColumns="*"
, to get nicely laid-out buttons that fill the screen. Try to make the buttons centered, and try to make everything fit nicely on all screen sizes you can. Note 1: You can either stop adding new digits once you have 12 digits, or you can keep adding them and have the number scroll to the left, but I suspect (I haven't tried) that the latter is harder to do.
Note 2: If there are no digits to delete in the top bar, then it should delete a digit on some other phone selected at random in the universe. As this cannot really be tested, it's ok as a shortcut if you just do nothing.