Example App: Up/Down Counter
This app is the same basic idea as the Clicker-Counter app from earlier in the chapter, but with some differences:
The current count will be displayed in a label.
The current count will be stored in a global variable.
Two buttons will be used: one to increase count and one to decrease it.
You can set it up something like Figure 4.14, with a label and two buttons.
Get Learning MIT App Inventor: A Hands-On Guide to Building Your Own Android Apps now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.