package es.craftsmanship.toledo.katangapp.activities;

import es.craftsmanship.toledo.katangapp.models.BusStopResult;
import es.craftsmanship.toledo.katangapp.models.QueryResult;

import android.content.Intent;

import android.os.Bundle;

import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import java.util.List;

/**
 * @author Cristóbal Hermida
 */
public class ShowStopsActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_show_stops);

        Intent intent = getIntent();

        QueryResult queryResult = (QueryResult) intent.getSerializableExtra("queryResult");

        List<BusStopResult> busStopResults = queryResult.getResults();

        RecyclerView recyclerView = (RecyclerView) findViewById(R.id.stops);

        recyclerView.setLayoutManager(new LinearLayoutManager(this));

        recyclerView.setAdapter(new StopsAdapter(busStopResults));
    }

}
@@ -709,24 +709,76 @@
 tIntent();%0A%0A
+        if (!intent.hasExtra(%22queryResult%22)) %7B%0A%0A    
         Quer
@@ -866,16 +866,20 @@
         
+    
 List%3CBus
@@ -942,16 +942,20 @@
         
+   
+ 
 Recycler
@@ -1008,32 +1008,36 @@
 d(R.id.stops);%0A%0A
+    
         recycler
@@ -1091,32 +1091,36 @@
 his));%0A%0A        
+    
 recyclerView.set
@@ -1162,16 +1162,26 @@
 ults));%0A
+        %7D%0A
     %7D%0A%0A%7D

gps can be null