O'Reilly logo

Learning MIT App Inventor: A Hands-On Guide to Building Your Own Android Apps by Mark Sherman, Derek Walter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Programming Part 2: Pinning a Location

This part of the app is actually easier to program than Part 1 because fewer elements are involved. Let’s start by creating the core feature: pinning a location. When the Pin_Location_Button is clicked, we want to do two things: copy the Current Location text to the Pinned Location display and save it in TinyDB.

Drag a TinyDB component into the Designer, if you have not already done so.

Assemble the click event handler for the Pin_Location_Button (see Figure 10.25).

Image

Figure 10.25 When the Pin_Location_Button is clicked, store the current location data to the TinyDB and copy it to the Pinned Location display. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required