Example #1
0
 @Override
 public void displayCities(List<City> cities) {
   if (!cities.isEmpty()) {
     for (City city : cities) {
       menuFragment.addCity(city);
     }
   }
 }
Example #2
0
 @Override
 public void CitySaved(City city) {
   if (city != null) {
     if (city.getName() != null) {
       menuFragment.addCity(city);
       dialogFragment.dismiss();
     }
   } else {
     Toast.makeText(
             this.getApplicationContext(),
             "This city already is in your Favourites",
             Toast.LENGTH_SHORT)
         .show();
   }
 }