title: How to show loading message in recyclerview
body: <p>I have a recyclerview and i want to show "loading... " message or spinning circle while the recycler is populated with data from json.
  This is the code for my recycler :</p>
  
  <pre><code> arrayList = new ArrayList&lt;&gt;();      
      adapter = new ListAdapterGrupat2(this, arrayList, Comanda.class);
      list.setAdapter(adapter);
      final Retrofit retrofit = new Retrofit.Builder()
              .baseUrl("http://mysite/")
              .addConverterFactory(GsonConverterFactory.create())
              .build();
      service = retrofit.create(API.class);  
  
      if (myuser.equals("1")) {
          service.getComenzileMele(user).enqueue(listener);
  
      } else {
          service.getComenziGrupat().enqueue(listener);
      }
  }
  Callback&lt;List&lt;CustomObject&gt;&gt; listener = new Callback&lt;List&lt;CustomObject&gt;&gt;() {
  
      @Override
      public void onResponse(Call&lt;List&lt;CustomObject&gt;&gt; call, Response&lt;List&lt;CustomObject&gt;&gt; response) {
          arrayList.clear();
          arrayList.addAll(response.body());
          adapter.notifyDataSetChanged();
      }
  
      @Override
      public void onFailure(Call&lt;List&lt;CustomObject&gt;&gt; call, Throwable t) {
          Toast.makeText(ComenziGrupatActivity.this, "ERROR", Toast.LENGTH_SHORT).show();           
      }
  };
  </code></pre>
  
  <blockquote>
    <p>This is the adapter :</p>
  </blockquote>
  
  <pre><code>public class ListAdapterGrupat2 extends RecyclerView.Adapter&lt;ListAdapterGrupat2.ViewHolder&gt; {   
  
  public ListAdapterGrupat2(Context context, ArrayList&lt;CustomObject&gt; arrayList, Class&lt;?&gt; cls) {        
  }
  
  @Override
  public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
      View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_programarigrupat, parent, false);
      return new ViewHolder(v);
  }
  
  @Override
  public void onBindViewHolder(ViewHolder holder, int position) {
      CustomObject obj = arrayList.get(position);
      holder.item2.setText(obj.getItem2());
  
  }
  </code></pre>