title: Android recyclerView findViewHolderForAdapterPosition returns null
body: <p>I want to click an item in recyclerView programmatically, I found <a href="https://stackoverflow.com/questions/29745919/clicking-on-item-programmatically-in-recyclerview">a way</a> do that:</p>
  
  <pre><code>recyclerView.findViewHolderForAdapterPosition(0).itemView.performClick();
  </code></pre>
  
  <p>but it doesn't work for me, the findViewHolderForAdapterPosition just returns null.</p>
  
  <p>Did I miss something in my code?</p>
  
  <p>HistoryListAdapter:</p>
  
  <pre><code>public class HistoryListAdapter extends RecyclerView.Adapter&lt;HistoryListAdapter.ViewHolder&gt; {
  private static ArrayList&lt;RecordItem&gt; recordItems;
  private static FragmentActivity activity;
  private static RecordList recordList;
  
  public HistoryListAdapter(ArrayList&lt;RecordItem&gt; recordItems, FragmentActivity FA, RecordList FRL) {
      this.recordItems = recordItems;
      this.activity = FA;
      this.recordList = FRL;
  }
  
  @Override
  public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
      // create a new view
      View itemLayoutView = LayoutInflater.from(parent.getContext()).inflate(R.layout.recorditem, parent, false);
      return new ViewHolder(itemLayoutView);
  }
  
  @Override
  public void onBindViewHolder(final ViewHolder viewHolder, final int position) {
      // TextView setText ...
  }
  
  // Return the size of the itemsData (invoked by the layout manager)
  @Override
  public int getItemCount() {
      return recordItems.size();
  }
  
  // inner class to hold a reference to each item of RecyclerView
  public static class ViewHolder extends RecyclerView.ViewHolder{
      public TextView result, datetime;
  
      public ViewHolder(View itemLayoutView) {
          super(itemLayoutView);
          itemLayoutView.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  if (activity != null) {
                      // do something...
                  }
              }
          });
          result = (TextView) itemLayoutView.findViewById(R.id.result);
          heartrate = (TextView) itemLayoutView.findViewById(R.id.heartrate);
          datetime = (TextView) itemLayoutView.findViewById(R.id.datetime);
      }
  }
  }
  </code></pre>
  
  <p>RecordList:</p>
  
  <pre><code>RecyclerView listView = (RecyclerView) layoutView.findViewById(R.id.listView);
  HistoryListAdapter listadapter = new HistoryListAdapter(itemsToShow, getActivity(), RecordList.this);
  listView.swapAdapter(listadapter, false);
  listView.findViewHolderForAdapterPosition(0).itemView.performClick();
  </code></pre>
  
  <p>I omitted some code, But it should not affect the overall structure of my code.</p>