title: Confirmation and undo removing in RecyclerView
body: <p>I have got a list of simple items in RecyclerView. Using ItemTouchHelper it was very easy to implement "swipe-to-delete" behavior.</p>
  
  <pre><code>public class TripsAdapter extends RecyclerView.Adapter&lt;TripsAdapter.VerticalItemHolder&gt; {
      private List&lt;Trip&gt; mTrips;
      private Context mContext;
      private RecyclerView mRecyclerView;
  
      [...]
  
      //Let adapter know his RecyclerView. Attaching ItemTouchHelper
      @Override
      public void onAttachedToRecyclerView(RecyclerView recyclerView) {
          ItemTouchHelper itemTouchHelper = new ItemTouchHelper(new TripItemTouchHelperCallback());
          itemTouchHelper.attachToRecyclerView(recyclerView);
          mRecyclerView = recyclerView;
      }
  
      [...]
  
      public class TripItemTouchHelperCallback extends ItemTouchHelper.SimpleCallback {
          public  TripItemTouchHelperCallback (){
              super(ItemTouchHelper.UP | ItemTouchHelper.DOWN, ItemTouchHelper.RIGHT);
          }
  
          @Override
          public boolean onMove(RecyclerView recyclerView,
                                RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) {
              //some "move" implementation
          }
          @Override
          public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {
              //AND WHAT HERE?
          }
      }
  }
  </code></pre>
  
  <p>It works well. However i also need to implement some undo action or confirmation. What is the best way to do this?</p>
  
  <p>First question is how to insert another view in place of removed with confirmation dialog? And how to restore swiped item, if user chooses to undo removing?</p>