Add comments

This commit is contained in:
misaochan 2016-08-25 19:13:02 +12:00
parent 854b1ce254
commit 01a104f029

View file

@ -45,9 +45,6 @@ public class NearbyListFragment extends ListFragment {
View view = inflater.inflate(R.layout.fragment_nearby, container, false);
//Load from data source (NearbyPlaces.java)
places = loadAttractionsFromLocation(mLatestLocation);
/*
// Create a progress bar to display while the list loads
ProgressBar progressBar = new ProgressBar(getActivity());
@ -67,8 +64,11 @@ public class NearbyListFragment extends ListFragment {
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
final ListView listview = (ListView) view.findViewById(R.id.listview);
//Load from data source (NearbyPlaces.java)
//TODO: Do asynchronously?
places = loadAttractionsFromLocation(mLatestLocation);
final ListView listview = (ListView) view.findViewById(R.id.listview);
mAdapter = new NearbyAdapter(getActivity(), places);
//setListAdapter(mAdapter);
listview.setAdapter(mAdapter);