Question 1 - Basics and resources
In this question, you create an Android app that displays your information according to the following requirements.
- The name of the app is “My Name”, and the package name of the app (i.e. app id)
- By default, the app displays your name in English and your student ID.
- If the locale of the device is traditional Chinese - Hong Kong, the app displays your name in Chinese and your student ID.
The following are sample outputs when the app is executed in locales of English (left) and traditional Chinese - Hong Kong (right), respectively.
Submit one whole Android project that contains all your work for this question.
Question 2 - Layout and UI
Unit 6 contains an example app of a tip calculator. Enhance the app according to the following screenshots and requirements.
- 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.
- 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 “No fractional digits”, “One fractional digit”, and
“Two fractional digits”. These menu items are checkable, mutually exclusive, and in a group. They control the number of digits displayed after the decimal point for the output fields of “Total Bill Amount” and “Total Per Person”. The right screenshot above shows the output fields with one fractional digit.
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.
Question 3 - Fragments, networking and concurrency
In this question, you develop an Android that checks the status of Web pages. A skeleton project, called WebChecker, is provided to you. Complete the project by working through the following tasks.
The following screenshots show the main screen (left) and log message screen (right) of the app. Submit one whole Android project that contains all your work for this question.