title: How to make the recyclerview uses an arraylist from a specific index
body: <p>I have recyclerview inside a fragment and the data coming via web request.!
  what I want is to ignore the first 3 items of the data array, I just want it to start from index 3.!</p>
  
  <p>I think it would be solved using <code>homeData.sublist(0,2)</code> but I don't know where exactly to put this line..! I've tried several places but didn't work..!?</p>
  
  <p><strong>My Fragment</strong> </p>
  
  <pre><code>public class HomeFragment extends BaseFragment {
  
    private RecyclerView recyclerView;
    ArrayList&lt;Home.HomeItem&gt; homeData;
    private HomeAdapter adapter;
  
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
       View rootView = inflater.inflate(R.layout.fragment_home, container, false);
      InitRecyclerView();
      GetData();
      return rootView;
    }
  
    private void GetData() {
  
        WebRequests.HomeRequest(new OnRequestResults() {
          @Override
          public void OnSuccess(Object o) {
  
            ArrayList&lt;Home.HomeItem&gt; homeList = (ArrayList&lt;Home.HomeItem&gt;) o;
            homeList.subList(0, 2); // tried here, but it didn't work
  
            homeData.clear();
            homeData.addAll(homeList);
            adapter.notifyDataSetChanged();
          } 
   }
  
    private void InitRecyclerView() {
  
      homeData = new ArrayList&lt;&gt;();
      recyclerView.setHasFixedSize(true);
      LayoutManager mLayoutManager = new LinearLayoutManager(getActivity());
      recyclerView.setLayoutManager(mLayoutManager);
  
       homeList.subList(0, 2); // tried here, it gives carsh `IndexOutofBound..`
  
      adapter = new HomeAdapter(homeData, getActivity());
      recyclerView.clearOnScrollListeners();
      recyclerView.setAdapter(adapter);
    }
  }
  </code></pre>
  
  <p>My Adapter </p>
  
  <pre><code>//code
  
  @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
  
      data.subList(0, 2); //noting changes here too
  
      holder.title.setText(data.get(position).getTitle());
      Picasso.with(context)
             .load(data.get(position)
             .getImgUrl).placeholder(R.drawable.logo)
             .into(holder.pic);
     }
  
      //code
  </code></pre>
  
  <p><strong>Update -------------------------------------------------------------------</strong></p>
  
  <p>I was using .subList wrong, I must specify the start and the end on the new list inside the parameters, I was adding the limits that I wanna remove which's completely stupid !</p>
  
  <p>also I added the line here inside the onSuccess !</p>
  
  <pre><code>@Override
          public void OnSuccess(Object o) {
            ArrayList&lt;Home.HomeItem&gt; home = (ArrayList&lt;Home.HomeItem&gt;) o;
            homeData.clear();
            homeData.addAll(home.subList(3,home.size())); //here
            adapter.notifyDataSetChanged();
          }
  </code></pre>