title: RecyclerView displaying no data
body: <p>I am trying to set data to a RecyclerView.</p>
  
  <p><strong>Here is the response data.</strong></p>
  
  <pre><code>[
      {
   "shopName": "Hello World.",
   "shopTeluguName": "మమ్మీ",
   "shopAddress": "Bomanahalli"
  }, 
      {
   "shopName": "Hello World.",
   "shopTeluguName": "మమ్మీ",
   "shopAddress": "Bomanahalli"
  }, 
      {
   "shopName": "Hello World.",
   "shopTeluguName": "మమ్మీ",
   "shopAddress": "Bomanahalli"
  }, 
      {
   "shopName": "Hello.",
   "shopTeluguName": "మమ్మీ",
   "shopAddress": "Bomanahalli"
  }
  ]
  </code></pre>
  
  <p>Its parsing and getting it in Arraylist all are working fine but the recycler view is not showing any data. Empty Screen. </p>
  
  <p><strong>Here is the Activity</strong></p>
  
  <pre><code>public class MainActivity extends AppCompatActivity implements WebServiceInterface {
  
      Toolbar toolbar;
      RecyclerView recyclerViewShops;
      private int FETCH_SHOPS_REQUEST_CODE = 1;
      ArrayList&lt;Shop&gt; arrayListShops;
      ShopsAdapter adapterShops;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          init();
  
          fetchShops();
      }
  
      private void init() {
  
          toolbar = (Toolbar) findViewById(R.id.toolbar);
          setSupportActionBar(toolbar);
          getSupportActionBar().setTitle("Shops List");
          getSupportActionBar().setDisplayHomeAsUpEnabled(false);
          getSupportActionBar().setDisplayShowHomeEnabled(false);
          toolbar.setTitleTextColor(Color.WHITE);
  
          recyclerViewShops = (RecyclerView) findViewById(R.id.recyclerView);
          RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(this);
          recyclerViewShops.setLayoutManager(mLayoutManager);
          recyclerViewShops.setItemAnimator(new DefaultItemAnimator());
          recyclerViewShops.setHasFixedSize(true);
  
          arrayListShops = new ArrayList&lt;&gt;();
  
      }
  
      private void fetchShops() {
  
          HashMap&lt;String, String&gt; paramsList = new HashMap&lt;&gt;();
  
          WebServiceController webServiceController = new WebServiceController(
                  this, this);
          String hitURL = LinksAndKeys.SHOPS_URL;
          webServiceController.sendGETRequest("", "Loading..", hitURL, paramsList, FETCH_SHOPS_REQUEST_CODE);
  
      }
  
      @Override
      public void getResponse(int responseCode, String responseString, String requestType, int requestCode) {
          if (requestCode == FETCH_SHOPS_REQUEST_CODE &amp;&amp; responseCode == 200) {
  
              Gson gson = new Gson();
              Shop[] shops = gson.fromJson(responseString, Shop[].class);
              arrayListShops = new ArrayList&lt;Shop&gt;(Arrays.asList(shops));
  
              adapterShops = new ShopsAdapter(this, arrayListShops);
              recyclerViewShops.setAdapter(adapterShops);
          }
      }
  }
  </code></pre>
  
  <p><strong>Here is the Adapter:</strong></p>
  
  <pre><code>public class ShopsAdapter extends RecyclerView.Adapter&lt;ShopsAdapter.MyViewHolder&gt; {
  
      Activity activity;
      private List&lt;Shop&gt; shopList;
  
      public class MyViewHolder extends RecyclerView.ViewHolder {
          LinearLayout linearLayoutParent;
          public TextView textViewShopName, textViewShopTeluguName, textViewShopAddress;
  
          public MyViewHolder(View view) {
              super(view);
              linearLayoutParent = (LinearLayout) view.findViewById(R.id.linearLayoutParent);
              textViewShopName = (TextView) view.findViewById(R.id.textViewShopName);
              textViewShopTeluguName = (TextView) view.findViewById(R.id.textViewShopTeluguName);
              textViewShopAddress = (TextView) view.findViewById(R.id.textViewShopAddress);
          }
      }
  
  
      public ShopsAdapter(Activity activity, List&lt;Shop&gt; shopList) {
          this.activity = activity;
          this.shopList = shopList;
      }
  
      @Override
      public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View itemView = LayoutInflater.from(parent.getContext())
                  .inflate(R.layout.row_shop, parent, false);
  
          return new MyViewHolder(itemView);
      }
  
      @Override
      public void onBindViewHolder(MyViewHolder holder, int position) {
          final Shop shop = shopList.get(position);
  
          holder.textViewShopName.setText(shop.getShopName());
          holder.textViewShopTeluguName.setText(shop.getShopTeluguName());
          holder.textViewShopAddress.setText(shop.getShopAddress());
  
          holder.linearLayoutParent.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Toast.makeText(activity, shop.getShopName(), Toast.LENGTH_SHORT).show();
              }
          });
      }
  
      @Override
      public int getItemCount() {
          return shopList.size();
      }
  }
  </code></pre>
  
  <p>Layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="com.saravanaeggdistributors.activities.MainActivity"&gt;
  
      &lt;include
          android:id="@+id/toolbar"
          layout="@layout/toolbar" /&gt;
  
      &lt;android.support.v7.widget.RecyclerView
          android:id="@+id/recyclerView"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:scrollbars="vertical" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The response is Fine, ArrayList has the data but recyclerview doesnt show.
  Any idea whats wrong here.?</p>