title: notifyDataSetChanged() doesn't work with my RecyclerView.Adapter when it's called from onActivityResult()
body: <p>When <code>onActivityResult()</code> is called after a user returns to the original activity I update the data for the <code>RecyclerView</code> and call <code>notifyDataSetChanged()</code> but <code>onBindViewHolder()</code> is not being called and the <code>RecyclerView</code> does not update. </p>
  
  <p>If I run the same code to update the Recylerview from an <code>onClick()</code> trigger the <code>RecyclerView</code> <strong>does</strong> update properly. It's only when the updating code is called from <code>onActivityResult()</code> that the <code>RecylerView</code> does not update. </p>
  
  <p>I tried updating the <code>RecylerView</code> by running the update method using the <code>runOnUiThread()</code> method but that didn't fix the issue. I have also tried all the relevant notify methods (i.e. <code>notifyDataSetChanged()</code> etc. ) of the <code>RecyclerView.Adapter</code> but I will just refer to the <code>notifyDataSetChanged</code> for simplicity. </p>
  
  <p>Here is a basic reproduction of the problem: </p>
  
  <pre><code>   //This code is in the Adapter, it removes an item from the arrayList and updates the RecylerView.     
       protected void refreshData(int position){
          arrayListData.remove(position);
          notifyDataSetChanged ();
      }
  
  
      //This code is in the ViewHolder. When refreshData() is called via the onClick() here the **RecylerView does successfully update** 
       @Override
              public void onClick(View v) {        
               if (shouldRefreshData == true) {     
                 refreshData(getAdapterPosition()); 
            } else {
                  Intent secondActivity = new Intent(context, SecondActivity.class);
  ((Activity)context).startActivityForResult(secondActivity, Adapter.REQUEST_CODE); 
           }
      }
  
  //I set the result code is in the Second Activity like this
   setResult(Adapter.REQUEST_CODE, usefulIntent);
  
  
  //This code is in the original activity, it successfully runs, and the refreshData() method is called and I can see the data has been removed via log statements in the refreshData() method but the onBindViewHolder() method is never called
  @Override
      protected void onActivityResult(int requestCode, int resultCode, final Intent data) {
           if (requestCode == Adapter.REQUEST_CODE) {
      ....
      adapter.refreshData(positionRetrievedFromTheDataIntent);
       }
   }
  </code></pre>
  
  <p>Seeing as the <code>refreshData()</code> method does properly update the <code>RecyclerView</code> when it's called via an <code>onClick()</code> trigger it seems that that method is configured properly. I tried adding delay to  the <code>onActivityResult</code> which would give the <code>RecylervView</code> time load any data before running the <code>refreshData()</code> method but that didn't fix the issue. </p>
  
  <p>Can anyone see any problems in my code or tell me how to fix this problem? </p>
  
  <p>I have looked over other SO questions but I couldn't find an applicable solution to this problem.</p>
  
  <p>Thanks in advance  </p>