Mobile Computing Android
Goal:
Build a simple app with a grid layout that helps a person select numbers for a lottery.Requirements:
1) You must use a grid with a least 12 locations. There must be at least two rows. There must be at least two columns. The widgets must include buttons and TextEdits.
2) The TextEdits allow you to select six numbers for the lottery. Five are regular and can be any value from 1 to 69. The sixth is for the powerball and can be from 1 to 26. The TextEdits in the grid must:
a. Allow the entry of a number.
b. Use white background for the 5 regular numbers and red for the single bonus number.
3) Six Buttons will allow the player to generate a random value and place it in the corresponding TextEdit
a. On click it will generate a random value and put it in the EditText.
b. Use a margin or padding to provide some separation of the buttons.
4) There should be a two buttons and a text view below the grid.
a. The clear button will clear all the values in the EditTexts
b. The Buy button will put the message "Purchased:" followed by all number choices.
c. The TextView will record a ticket purchase
Bonus:
Ø Guarantee that the 5 regular numbers are different before you purchase. If not, set a message "Duplicate number."Ø Guarantee that the numbers are in the correct range before you purchase. Set a message if not.
Ø When you print the 5 regular numbers on purchase, put them in increasing order.
Ø Add images to the buttons.
Ø Add buttons that will increase the corresponding value by 1.
Ø Add a button that will randomize all the numbers.
Ø Add descriptive labels.
Ø Have the app change the background color of the text when the button is pressed.
Ø Use a TableLayout instead of a GridLayout