You can support this tutorial effort by purchasing a copy of the e-book from any of the following e-book vendors – thank you for your help!
Sorry for the “spam” – this is to update the earlier post with the news that the ebook is now available from Nook Press. It took longer than expected for that version of the book to go live.
How to implement a button that continuously changes color, as demonstrated in this video example:
The Designer View
Create a simple user interface with two buttons – one to start the color change and the other to stop the color changes. In the button properties, set the button shape to “oval”.
Drag a clock component into the Designer – the Clock will appear as a non-visible component at the bottom of the Viewer.
Blockly is intended for use by software developers (rather than children learning to code) to generate Javascript:
Blockly was influenced by App Inventor, which in turn was influenced by Scratch, which in turn was influenced by StarLogo. As a result, children who are familiar with one have no difficulty moving to another.
My App Inventor 2: Tutorial e-book – the fast and easy way to create Android apps – is now available from Amazon, Google Play Books, Apple Books via iTunes, and Kobo! And its very inexpensive – less than USD $3.00! Less than a latte!
Usage is climbing sharply! MIT suggests the usage trend indicates high usage in schools – with a drop in the summer and a very rapid expansion once school resumed in September.
This tutorial covers the simple changing of the color of a button, while the app is running. You may also set a component’s color by changing the color properties on the Properties list in the Designer.
A second tutorial will show how to implement the continuously changing color demonstrated in the video example. That will be posted next!
The Designer View
To demonstrate the “simple” version, create an app with this user interface:
That’s simple!
Each time the button is pressed, the color of the button will change.