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. ...

Get Seven Mobile Apps in Seven Weeks now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.