Skip to content

Instantly share code, notes, and snippets.

@haristhohir
Created May 23, 2015 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haristhohir/27eebfc4e246da0b6351 to your computer and use it in GitHub Desktop.
Save haristhohir/27eebfc4e246da0b6351 to your computer and use it in GitHub Desktop.
void onLocationChanged( String newLocation ) {
// replace the uri, since the location has changed
Uri uri = mUri;
if (null != uri) {
long date = WeatherContract.WeatherEntry.getDateFromUri(uri);
Uri updatedUri = WeatherContract.WeatherEntry.buildWeatherLocationWithDate(newLocation, date);
mUri = updatedUri;
getLoaderManager().restartLoader(DETAIL_LOADER, null, this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment