コード例 #1
0
  private void createRecyclerViewAdapter() {
    adapter = new SelectAirportAdapter();
    adapter.setAirports(placesFromServer);
    infoAdapter = new SelectAirportInfoAdapter(getActivity(), adapter);

    adapter.setOnClickListener(onAirportSelectedListener);

    if (recyclerView != null) {
      recyclerView.setAdapter(infoAdapter);
    }

    updateAdapter();
  }
コード例 #2
0
 private void updateAdapter() {
   if (getActivity() == null) return;
   adapter.setAirports(placesFromServer);
   infoAdapter.notifyDataSetChanged();
 }