content: package com.andrey7mel.stepbystep.view.adapters;
  
  import android.support.v7.widget.RecyclerView;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.TextView;
  
  import com.andrey7mel.stepbystep.R;
  
  import java.util.List;
  
  public abstract class BaseAdapter<T> extends RecyclerView.Adapter<BaseAdapter.ViewHolder> {
  
      protected List<T> list;
  
      public BaseAdapter(List<T> list) {
          this.list = list;
      }
  
      public List<T> getList() {
          return list;
      }
  
      @Override
      public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
          View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.text_item_layout, viewGroup, false);
          return new ViewHolder(v);
      }
  
  
      @Override
      public int getItemCount() {
          return list.size();
      }
  
      class ViewHolder extends RecyclerView.ViewHolder {
          TextView text;
  
          public ViewHolder(View itemView) {
              super(itemView);
              text = (TextView) itemView.findViewById(R.id.textView);
          }
      }
  
  }
  