{ loadingView.setVisibility(View.GONE); Toast.makeText(parent.getContext(), throwable.getMessage(), Toast.LENGTH_SHORT).show(); } private void showLoading(Object object) { loadingView.setVisibility(View.VISIBLE); } private void addFlight(FlightModel flightModel) { loadingView.setVisibility(View.GONE); flightsView.add(flightModel); } private void showFrom(List<String> cities) { ArrayAdapter<String> adapter = new ArrayAdapter<>(fromView.getContext(), android.R.layout.simple_list_item_1, cities); fromView.setAdapter(adapter); } }