14.5.5. Class SingleForecastFragment

The SingleForecastFragment is a subclass of Fragment designed to display the current conditions for a city.

SingleForecastFragment package Statement, import Statements and Fields

Figure 14.35 begins the definition of class define SingleForecastFragment and defines its fields. Lines 25–30 define various String constants that are used as keys when we save and restore a SingleForecastFragment’s state during orientation changes.

  1   // SingleForecastFragment.java   2   // Displays forecast information for a single city.   3   package com.deitel.weatherviewer;   4      5   import android.content.Context;   6   import android.content.res.Resources;   7   import android.graphics.Bitmap;   8   import android.os.Bundle; ...

Get Android How to Program 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.