O'Reilly logo

Seven Mobile Apps in Seven Weeks by Tony Hillerson

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

Day 2: What Can I Get for a Buck?

Or, Building a Conversion Interface

We’ve got a solid foundation in place for getting data to and from the API. Now let’s get into building an interface for the app.

Building an Interface

To allow the user to be able to do the conversion of one currency to another, we’ll need an interface. Android’s interface definition is done mostly in XML, with sensible layout language and a very powerful system for dealing with device differences. Let’s start by building a form for the user to specify two currencies and convert an amount in one to an amount in the other.

Creating a Linear Layout

The activity_convert.xml layout is the view that ConvertActivity manages. Here’s the first line of input fields for currencies. ...

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