private void createRecyclerViewAdapter() { adapter = new SelectAirportAdapter(); adapter.setAirports(placesFromServer); infoAdapter = new SelectAirportInfoAdapter(getActivity(), adapter); adapter.setOnClickListener(onAirportSelectedListener); if (recyclerView != null) { recyclerView.setAdapter(infoAdapter); } updateAdapter(); }
private void updateAdapter() { if (getActivity() == null) return; adapter.setAirports(placesFromServer); infoAdapter.notifyDataSetChanged(); }