Create four square Views, one in each corner of the UI.
You may use any View type you wish
Bonus use at least 2 different types such as 2 Buttons and 2 TextViews
Implement View.OnClickListener in MainActivity.java
Assign same onClick event listener to each View
Display the number of clicks for each View
Store the values of each View onto the device using SharedPreferences
Either store the values in variables or use the getText()/setText() methods to access and track the values. Then store to SharedPreferences. (If you use the latter, remember to parse the String values to int's when performing calculations.)
For extra fun, store to SharePreferences using the View's ID or tag. (You must assign a tag to each View to use the latter option.)
Don't forget to review the developer site
Tutorial which may be helpful:
In the onResume() event handler, set the initial values by retrieving from SharedPreferences
Test by closing your app, reopening, and observing the values (should be the same as values at the time of closing)
Bonus: display the clicks per second in a Toast
Add a SeekBar
Slider changes the font size in the Views
When SeekBar tracking stops, pop a message using Snackbar that shows which shows the font size selected
Bonus: Add an undo action which will revert to previous font size and reset the SeekBar location to its last position
Reset
Set an OnLongClickListener on the layout to clear SharedPreferences and reset the app
Build and Run your app on device
Video capture your app
Build the .apk file
Rename the .apk file
PeriodLabNumberLastFirstCustomName.apk
P8L03aTraDan4Corners.apk
Submit assignment
Video
.apk file
Classes: MainActivity.java
Layouts: activity_main.xml
Values: strings.xml
Values: dimens.xml
Custom ideas and demo
Customize as you desire...
Submit as Lab03b
P8L03bTraDan4Corners.apk
Video