7.1 Introduction

The WeatherViewer app (Fig. 7.1) uses the free OpenWeatherMap.org REST web services to obtain a specified city’s 16-day weather forecast. The app receives the weather data in JSON (JavaScript Object Notation) data format. The list of weather data is displayed in a ListView—a view that displays a scrollable list of items. In this app, you’ll use a custom list-item format to display:

Fig. 7.1 Weather Viewer app displaying the New York, NY, US weather forecast.

A screenshot of the weather Viewer application.
  • a weather-condition icon

  • the day of the week with a text description of that day’s weather

  • the day’s low and high temperatures (in °F), and ...

Get Android How to Program, 3/e 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.