Unit 6 contains an example app of a tip calculator. Enhance the app according to the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Unit 6 contains an example app of a tip calculator. Enhance the app according to the following screenshots and requirements. Tip Calculator Amount 246.135 To ( 5 7 4 1 0 Number of people 3 1 Tp. 5 Total Amount $258.44 Total Per Pers $86.15 Tip Calculator 246.135 5% 7 4 1 0 Number of people: 3 Total Bil Amst $258.44 Total Per Person $86.15 2 2 5 2 10% 8 5 2 10% 3 8 15% CLEAR 4 9 4 6 3 x CLEAR 9 6 3 X 20% 5 20% 5 Tip Calculator 246.135 J About Chan Tai Man ID: 12345678 Number of people 3 Total Ascunt $258.44 Total Per Person $86.15 Tip Calculator Amount 246.135 Tip (5): 5 7 1 4 1 0 5% Number of people 3 Total Bil Amount: $258.44 Total Per Person $86.15 2 2 I 5 8 5 2 10% 3 CLEAR 4 OK 15% Ⓡ CLEAR 9 X Tip Calculator Amount 246.135 To (M): 5 7 4 1 0 5% Number of people 3 1 Total Amount $258.44 Total Per Person $86.15 5 2 2 10% Blue Green White 3 15% 4 9 6 3 X 20% 5 a. Modify the portrait layout (existing in the project) to add 12 buttons under the "Bill Amount" input field, as shown in the left screenshot above. b. Create a new landscape layout that contains the same components in the portrait layout (with the same IDs). Design the layout so that the components work properly in the landscape device orientation. c. Implement the event handlers of the 12 new buttons as follows. o For each of the digit buttons, i.e., "1", "2", "3", ..., "9", and "0", append the digit of the clicked button to the bill amount input field. o For the "." button, append a dot "." to the bill amount input field if it has no "." yet. (Nothing happens if a "." already exists in the field.) o For the "x" (backspace) button, remove the last character from the bill amount field if it is not empty. (Nothing happens if the field is empty.) d. Create an "About" options menu item and show it as an action item. You may use a built-in Android drawable resource as its icon. When the item is selected, an "About" dialog box appears to show your name and your student ID, as in the middle screenshot above. e. Create three options menu items "Blue", "Green", and "White". These menu items are checkable, mutually exclusive, and in a group. They control the background color of the app. Specifically, color constants android.R.color.holo_blue_light (blue), android.R.color.holo_green_light android.R.color.white (white) should be used. (green) and For simplicity, you may hard-code new strings in the programs, and don't need to use primary or alternative string resources for them. Submit one whole Android project that contains all your work for this question. Unit 6 contains an example app of a tip calculator. Enhance the app according to the following screenshots and requirements. Tip Calculator Amount 246.135 To ( 5 7 4 1 0 Number of people 3 1 Tp. 5 Total Amount $258.44 Total Per Pers $86.15 Tip Calculator 246.135 5% 7 4 1 0 Number of people: 3 Total Bil Amst $258.44 Total Per Person $86.15 2 2 5 2 10% 8 5 2 10% 3 8 15% CLEAR 4 9 4 6 3 x CLEAR 9 6 3 X 20% 5 20% 5 Tip Calculator 246.135 J About Chan Tai Man ID: 12345678 Number of people 3 Total Ascunt $258.44 Total Per Person $86.15 Tip Calculator Amount 246.135 Tip (5): 5 7 1 4 1 0 5% Number of people 3 Total Bil Amount: $258.44 Total Per Person $86.15 2 2 I 5 8 5 2 10% 3 CLEAR 4 OK 15% Ⓡ CLEAR 9 X Tip Calculator Amount 246.135 To (M): 5 7 4 1 0 5% Number of people 3 1 Total Amount $258.44 Total Per Person $86.15 5 2 2 10% Blue Green White 3 15% 4 9 6 3 X 20% 5 a. Modify the portrait layout (existing in the project) to add 12 buttons under the "Bill Amount" input field, as shown in the left screenshot above. b. Create a new landscape layout that contains the same components in the portrait layout (with the same IDs). Design the layout so that the components work properly in the landscape device orientation. c. Implement the event handlers of the 12 new buttons as follows. o For each of the digit buttons, i.e., "1", "2", "3", ..., "9", and "0", append the digit of the clicked button to the bill amount input field. o For the "." button, append a dot "." to the bill amount input field if it has no "." yet. (Nothing happens if a "." already exists in the field.) o For the "x" (backspace) button, remove the last character from the bill amount field if it is not empty. (Nothing happens if the field is empty.) d. Create an "About" options menu item and show it as an action item. You may use a built-in Android drawable resource as its icon. When the item is selected, an "About" dialog box appears to show your name and your student ID, as in the middle screenshot above. e. Create three options menu items "Blue", "Green", and "White". These menu items are checkable, mutually exclusive, and in a group. They control the background color of the app. Specifically, color constants android.R.color.holo_blue_light (blue), android.R.color.holo_green_light android.R.color.white (white) should be used. (green) and For simplicity, you may hard-code new strings in the programs, and don't need to use primary or alternative string resources for them. Submit one whole Android project that contains all your work for this question.
Expert Answer:
Answer rating: 100% (QA)
a Modifying the portrait layout In your existing projects portrait layout file likely activitymainxml locate the section for the Bill Amount input field Below this field add a new horizontal linear la... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-6. On December 12, Irene purchased the building where her store is located. She paid...
-
Let n=102 +r, where , re N, 0r9. A number a is chosen at random from the set {1, 2, 3, ..., n} and let pn denote the probability that (a 1) is divisible by 10. 70. If r = 0, then npn equals (a) 22...
-
Matiere Co. completed the following transactions during 2013 and 2014 2013 Dec. 31 Estimated that bad-debt expense for the year was 3 percent of credit sales of $385,000 and recorded that amount as...
-
With the help of Tables 10-8 and 10-9 find the formulas of the following compounds: silicon carbide; lead(II) oxide; manganese(IV) oxide; sodium nitride.
-
How many forms of main() are there?
-
Dillon Labs has asked its financial manager to measure the cost of each specific type of capital as well as the weighted average cost of capital. The weighted average cost is to be measured by using...
-
How much energy does a male Jackson's widowbird of mass 45 g expend when jumping to a height of 1.0 m during its mating ritual? Neglect all losses due to air resistance
-
A ladder of length L and mass M has its bottom end attached to the ground by a pivot. It makes an angle ? with the horizontal, and is held up by a massless stick of length ? which is also attached to...
-
In a competitive marketplace, successful companies understand that they cannot serve all buyers. Using examples, discuss how such a company can develop a customer-driven marketing strategy.
-
Japanese corporations have a higher rate of premature return of expatriates than us Americans true or false?
-
What is the impact on taxes when the manager sells an asset at a loss? The manager at the Chesapeake Bay Crab House reported a current disposal value of an old fish processing machine at $8,200. The...
-
explain and also tell what is the difference of term insurance and ordinary insurance in this case.
-
Let f(x) = x - 5 and g(x) = x. Find the function f - g. (f g)(x) = Find the domain. (Enter your answer using interval notation.)
-
Describe the importance of business communication in the digital age? What are the barriers of effective business communication and how do you like to overcome those barriers using technology?
-
Presley Corp., a calendar-year corporation, was formed four years ago by its sole shareholder, Smith, who has always operated it as a C corporation. However, at the beginning of 2020, Smith made a...
-
Discuss the concept of the looking-glass self. how do you think others perceive you? do you think most people perceive you correctly?
-
Teresa is a civil engineer who uses her automobile for business. Teresa drove her automobile a total of 21,732 miles during 2012, of which 95 percent was business mileage. The actual cost of...
-
Your supervisor has asked you to research the following situation concerning Owen and Lisa Cordoncillo. Owen and Lisa are brother and sister. In May 2012, Owen and Lisa exchange business pickup...
-
If Charles, a 16-year-old child model, earns $50,000 a year and is completely self supporting even though he lives with his parents, can his parents claim him as a dependent? Why or why not?...
-
Which mechanism of bacterial genetic transfer does not require recombination with the bacterial chromosome?
-
Explain why small deletions and duplications are less likely than large ones to have a detrimental effect on an individuals phenotype. If a small deletion within a single chromosome happens to have a...
-
Explain why inversions and reciprocal translocations do not usually cause a phenotypic effect. Then explain how they can do so in certain cases.
Study smarter with the SolutionInn App