English subtitles

← Use SharedPreferences Solution - Developing Android Apps

Get Embed Code
10 Languages

Showing Revision 14 created 05/25/2016 by Udacity Robot.

  1. Within the forecast fragment class,
  2. when the refresh menu item is selected,
  3. we read from SharedPreferences.
  4. Since they are key-value pairs,
  5. we get their value stored
    for the location key.
  6. If there's no value stored
  7. then we fall back
    to the default location.
  8. Then we pass the location
    into the fetch weather task.