Difference between revisions of "MAP524/DPS924 Lab 5"
(→Part A) |
|||
Line 8: | Line 8: | ||
# Change the context menu to the following two items: | # Change the context menu to the following two items: | ||
## Write colour to SDCard | ## Write colour to SDCard | ||
− | ## Read colour | + | ## Read colour from SDCard |
# Selecting "write" will write the current colour to the SDCard. | # Selecting "write" will write the current colour to the SDCard. | ||
# Selecting "read" will read the colour from the SDCard and set the background to that colour. | # Selecting "read" will read the colour from the SDCard and set the background to that colour. |
Latest revision as of 13:09, 14 February 2016
Due: in the lab period, need professor sign-off.
Part A
Create a simple Android app, named My List that continues from the example given in this week's lecture notes. Once you have the basic app running correctly from the notes, make these modifications:
- When the user selects a colour, change the background to that colour.
- Change the context menu to the following two items:
- Write colour to SDCard
- Read colour from SDCard
- Selecting "write" will write the current colour to the SDCard.
- Selecting "read" will read the colour from the SDCard and set the background to that colour.
- When the app starts it should get the colour from the SDCard.
- If no colour has yet been written to the SDCard then let the background colour default.
- When your app is working please complete PART B.
Part B
Explain the purpose/function of each of the following in your own words (that means not someone else's words), in your labbook:
- res/values/arrays.xml file
- ArrayAdapter class
- AdapterView class
- Toast class
- registerForContextMenu() method
- ContextMenu class