Issue
I am currently trying to complete a revision test on Android Mobile Application Development and am stuck on a final question-
- The following code is part of an Activity that reads and writes data to a file stored on the device. The app should work with the lifecycle methods to make sure data is automatically stored and displayed. The code contains four common errors which you should highlight
Am I right in thinking the last two functions don't need to be protected? And that EditText and ListView should be elsewhere?
Any help would be appreciated.
Thanks
Solution
i guess the following are the errors:
1) EditText is typecast into ListView which is illegal
2)The toast wouldn't show without .show() function in the end of makeText()
3 & 4) The onResume and onPause are public!
I am no expert, but I guess these are the errors most probably!
Answered By - Gk'
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.