Chapter 17. Listing Data in the App
In the last chapter, we went through the basics of starting a new project in Android Studio and Xcode. We were also charged by a mysterious librarian to build an app for a library that, presumably, has magic powers. This is just a typical day in the life of a mobile app developer.
Within this chapter, we’re going to add a bit more structure and scaffolding to our app. More specifically, we will learn:
-
How to customize and tweak views
-
How to trigger actions from button
-
How to show lists of data
-
How to transition between two screens
This is a long chapter, so let’s get started. Our future library patrons are waiting.
Sprucing Up Views
If you take a look at both the Android and iOS apps in their current state, they are fairly skeletal and uninviting. We can do a better job than a basic label that says “Welcome” displayed against a blank background. In fact, both platforms have a pretty robust set of built-in tools for styling that we can use to make our app more presentable and inviting. We’re not going to get in depth into those tools—the tooling is quite deep and the possibilities are near limitless with what you can create—but for now let’s at least spruce up the apps a bit.
Android
Referring back to Chapter 15, you’ll see that we started with a simple Activity
when we chose the project type and were able to update the text. Let use this same Activity
and XML layout to update our welcome screen. For this simple version, we won’t ...
Get Native Mobile Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.