Exemplo n.º 1
0
 @Override
 public void onLoadFinished(Loader<ObservationsMap> loader, ObservationsMap data) {
   if (data != null) {
     mMarkersAdapter.setMarkers(data.markers);
     HomeFragment homeFragment = getHomeFragment();
     if (data.centerConditions != null && homeFragment != null) {
       homeFragment.setWeatherConditionsBar(data.centerConditions);
     }
   }
 }
Exemplo n.º 2
0
 private void showHomeFragment() {
   mWeatherModeBtn.setVisibility(View.GONE);
   mTemperatureModeBtn.setVisibility(View.GONE);
   mLogoView.setVisibility(View.VISIBLE);
   setMapGestureEnabled(false);
   if (mInfoWindowMarker != null) {
     mInfoWindowMarker.hideInfoWindow();
     mInfoWindowMarker = null;
   }
   getLoaderManager().destroyLoader(LOADER_OBSERVATION);
   if (getHomeFragment() == null) {
     FragmentManager fm = getFragmentManager();
     HomeFragment homeFragment = new HomeFragment();
     homeFragment.setTargetFragment(this, -1);
     fm.beginTransaction().replace(R.id.overlay_host, homeFragment).commit();
   }
 }