Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Commit

Permalink
Simplify for-loop
Browse files Browse the repository at this point in the history
  • Loading branch information
bparmentier committed Sep 28, 2015
1 parent 0b14b59 commit 30b30f9
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
import java.util.ArrayList;

import be.brunoparmentier.openbikesharing.app.R;
import be.brunoparmentier.openbikesharing.app.models.Station;
import be.brunoparmentier.openbikesharing.app.adapters.StationsListAdapter;
import be.brunoparmentier.openbikesharing.app.activities.StationActivity;
import be.brunoparmentier.openbikesharing.app.adapters.StationsListAdapter;
import be.brunoparmentier.openbikesharing.app.models.Station;

public class StationsListFragment extends Fragment {
private ArrayList<Station> stations;
Expand Down Expand Up @@ -76,9 +76,7 @@ public void onItemClick(AdapterView<?> parent, View view,
public void updateStationsList(ArrayList<Station> stations) {
if (stationsListAdapter != null) {
stationsListAdapter.clear();
for (Station station : stations) {
stationsListAdapter.add(station);
}
stationsListAdapter.addAll(stations);
stationsListAdapter.notifyDataSetChanged();
}
}
Expand Down

0 comments on commit 30b30f9

Please sign in to comment.