O'Reilly logo

Android How to Program by Paul Deitel, Abbey Deitel, Harvey Deitel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required