title: How to create textview that hold the count of items in recyclerview in android studio
body: <p>I have tried to create recyclerview and Textview that hold the number of items inside the recyclerview. When I scroll down the number of item should be increased. Here is my code:</p>
  
  <pre><code>import android.content.Context;
  import android.support.v7.widget.RecyclerView;
  import android.util.Log;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ImageView;
  import android.widget.TextView;
  
  import com.squareup.picasso.Picasso;
  
  import java.util.ArrayList;
  
  public class MyAdapter extends RecyclerView.Adapter&lt;MyAdapter.MyViewHolder&gt; {
  
      private static final String LOG_TAG = MyAdapter.class.getSimpleName();
      ArrayList&lt;FeedItem&gt; feedItems;
      Context context;
  
      TextView Counter;
  
      public MyAdapter(Context context, ArrayList&lt;FeedItem&gt; feedItems){
          this.feedItems = feedItems;
          this.context = context;
      }
      @Override
      public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View view = LayoutInflater.from(context).inflate(R.layout.custum_row_news_item, parent, false);
          MyViewHolder holder = new MyViewHolder(view);
          return holder;
      }
  
      @Override
      public void onBindViewHolder(MyViewHolder holder, int position) {
  
          FeedItem current = feedItems.get(position);
          String count = Integer.toString(++position);
          Log.d(LOG_TAG, " Processing: " + count);
  
  //        Toast toastMessage = Toast.makeText(this, "Text value is now " + count, Toast.LENGTH_LONG);
  //        toastMessage.show();
  
  
          holder.Title.setText(current.getTitle());
          holder.Artist.setText(current.getArtist());
          holder.Date.setText(current.getReleaseDate());
          Picasso.with(context).load(current.getImageUrl()).into(holder.Image);
  
  
      }
  
  
  
      @Override
      public int getItemCount() {
          return feedItems.size();
      }
  
      public class MyViewHolder extends RecyclerView.ViewHolder {
          TextView Title,Artist,Date;
          ImageView Image;
  
          //TextView ItemsCounter;
  
          public MyViewHolder(View itemView) {
              super(itemView);
              Title= (TextView) itemView.findViewById(R.id.title_text);
              Artist= (TextView) itemView.findViewById(R.id.counter_text);
              Date= (TextView) itemView.findViewById(R.id.date_text);
              Image= (ImageView) itemView.findViewById(R.id.image_img);
          }
      }
  
  }
  </code></pre>
  
  <p>Please help me this is the best I did..</p>