Skip to Content
Native Mobile Development
book

Native Mobile Development

by Shaun Lewis, Mike Dunn
November 2019
Intermediate to advanced
394 pages
9h 44m
English
O'Reilly Media, Inc.
Content preview from Native Mobile Development

Chapter 19. And Yet, We Persisted

If we take stock of where we are with our app so far, it’s come along quite nicely. We’ve got some solid functionality. The data being pulled is backed by a portable format, specifically JSON, and it’s functionally sound. This is a great starting place to take our app further.

Detailing Our Books

First, we should add a new screen to show some more information on a book. Right now, there really isn’t a way to view anything of importance about our books other than the title. And guess what? Books have a TON of information about them. Everything from title, author, ISBN, the list goes on! In fact, some of the most usable information about a book is contained in this information.

We know we’ll display a book. Specifically, the information currently available in our book model object, Book, is the following:

  • title

  • authors

  • isbn

  • pageCount

  • fiction

That’s not tons of data, but it’s enough. Plus, we’re going to expand on this screen in a bit, but for now let’s add something quickly in Android and iOS.

Android

If you recall Chapter 2 and Chapter 15, what follows should be very familiar.

First, let’s define our layout using XML. We know we want to show each of the Book instances properties, so let’s just list them out in a vertical fashion that we’ll decorate programmatically. Again, we’ll want to make sure our LinearLayout is wrapped in a ScrollView so that we can show all our information regardless of screen size, device density, or accessibility ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pro iPhone Development with SwiftUI: Design and Manage Top Quality Apps

Pro iPhone Development with SwiftUI: Design and Manage Top Quality Apps

Wallace Wang
Ionic in Action

Ionic in Action

Jeremy Wilken
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz

Publisher Resources

ISBN: 9781492052869Errata PageSupplemental Content