title: Using Snackbar.Callback for Undo-Delete action
body: <p>I have a working linear <code>RecyclerView</code> with swipe-to-delete and everything is good.
  However, when I try the <code>Snackbar.Callback</code> to create a "undo" action, I get list error's like "invalid Index", the item is swiped away then immediately reappears, and even "Inconsistency detected" errors. Any one see something odd in the code?</p>
  
  <pre><code>        @Override
          public void onSwiped(final RecyclerView.ViewHolder viewHolder, int direction) {
              // item position
              final int pos = viewHolder.getAdapterPosition();
              communicator.remove(pos);
              recyclerViewAdapter.notifyItemRemoved(pos);
  
              Snackbar.make(view, R.string.notice_removed, Snackbar.LENGTH_LONG)
                      .setCallback(new Snackbar.Callback() {
                          @Override
                          public void onDismissed(Snackbar snackbar, int event) {
                              switch (event) {
                                  case Snackbar.Callback.DISMISS_EVENT_ACTION:
                                       recyclerViewAdapter.notifyItemInserted(pos);
                                       break;
                                  default:
                                      communicator.remove(pos);
                                      break;
                              }
                          }
                      })
                      .setAction(R.string.action_undo, new View.OnClickListener() {
                          @Override
                          public void onClick(View v) {
                              // do nothing
                          }
                      })
                      .show();
  
              recyclerViewAdapter.notifyItemRangeChanged(pos, recyclerViewAdapter.getItemCount());
          }
  </code></pre>