title: How to display json data in listview with retrofit 2
body: <p>What I want to do: Populate the List view with names of the Station which i will retrieve in json form from api.</p>
  
  <p>Problem: I'm having problems populating the list view with the Station Names, Not sure what steps to take. When i hit the button nothing happens. Any push to the right direction would be greatly appreciated. Below is my code thus far.</p>
  
  <p>My Station model</p>
  
  <pre><code>public class Station {
      @SerializedName("id")
      int mStationId;
      @SerializedName("name")
      String mStationName;
      @SerializedName("lat")
      double mStationLat;
      @SerializedName("long")
      double mStationLong;
  
  public Station(int mStationId, String mStationName, double mStationLat, double mStationLong) {
      this.mStationId = mStationId;
      this.mStationName = mStationName;
      this.mStationLat = mStationLat;
      this.mStationLong = mStationLong;
  }
  }
  </code></pre>
  
  <p>My ServiceGenerator</p>
  
  <pre><code>public class ServiceGenerator {
  
  public static final String API_BASE_URL = "http://keantrolley.bbapi.co/stations/";
  
  private static OkHttpClient httpClient = new OkHttpClient();
  private static Retrofit.Builder builder =
          new Retrofit.Builder()
                  .baseUrl(API_BASE_URL)
                  .addConverterFactory(GsonConverterFactory.create());
  
  public static  &lt;S&gt; S createService(Class&lt;S&gt; serviceClass) {
      Retrofit retrofit = builder.client(httpClient).build();
      return retrofit.create(serviceClass);
  }
  } 
  </code></pre>
  
  <p>Then my interface</p>
  
  <pre><code>public interface StationClient {
  @GET("station")
  Call&lt;List&lt;Station&gt;&gt; listStations();
  }
  </code></pre>
  
  <p>My MainActivity</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
  private ListView stationsListView;
  private ArrayAdapter&lt;Station&gt; stationListAdapter;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      stationsListView = (ListView) findViewById(android.R.id.list);
  
      stationListAdapter = new ArrayAdapter&lt;&gt;(this, android.R.layout.simple_list_item_1, new LinkedList&lt;Station&gt;());
      stationsListView.setAdapter(stationListAdapter);
  }
  
  public void getStations(View view) {
      stationListAdapter.clear();
      stationListAdapter.notifyDataSetChanged();
  
      StationClient stationClient = ServiceGenerator.createService(StationClient.class);
      Call&lt;List&lt;Station&gt;&gt; call = stationClient.listStations();
      call.enqueue(new Callback&lt;List&lt;Station&gt;&gt;() {
          @Override
          public void onResponse(Response&lt;List&lt;Station&gt;&gt; response, Retrofit retrofit) {
              if (response.isSuccess()) {
                  stationListAdapter.addAll(); //Here is where i believe is the root of the problem
              } else {
                  stationListAdapter.addAll();
              }
          }
  
          @Override
          public void onFailure(Throwable t) {
              Log.d("Error", t.getMessage());
          }
      });
  }
  
  }
  </code></pre>