@Test public void testRestoreHolderWithoutInteractiveView() throws Exception { final RecyclerView mockRecyclerView = mock(RecyclerView.class); final View itemView = new View(context); final TestHolder mockViewHolder = createMockHolder(mockRecyclerView, itemView, 0); when(mockViewHolder.getInteractiveView(ItemSwipeHelper.INTERACTION)).thenReturn(null); final ItemSwipeHelper helper = new ItemSwipeHelper(); assertThat(helper.restoreHolder(mockViewHolder, ItemSwipeHelper.START), is(false)); verify(mockViewHolder).getInteractiveView(ItemSwipeHelper.INTERACTION); }
public boolean restoreHolder(@NonNull final RecyclerView.ViewHolder viewHolder, @Direction final int direction) { return restoreHolder(viewHolder, direction, null); }
ItemSwipeHelper extends RecyclerViewItemHelper<ItemSwipeHelper.Interactor> { public boolean restoreHolder(@NonNull final RecyclerView.ViewHolder viewHolder, @Direction final int direction) { return restoreHolder(viewHolder, direction, null); } }
ItemSwipeHelper extends RecyclerViewItemHelper<ItemSwipeHelper.Interactor> { public boolean restoreHolder(@NonNull final RecyclerView.ViewHolder viewHolder, @Direction final int direction) { return restoreHolder(viewHolder, direction, null); } ItemSwipeHelper(); private  ItemSwipeHelper(final Interactor interactor); }
ItemSwipeHelper extends RecyclerViewItemHelper<ItemSwipeHelper.Interactor> { public boolean restoreHolder(@NonNull final RecyclerView.ViewHolder viewHolder, @Direction final int direction) { return restoreHolder(viewHolder, direction, null); } ItemSwipeHelper(); private  ItemSwipeHelper(final Interactor interactor); static int makeSwipeFlags(@Movement final int movementFlags); void setRestoreHolderAnimationDuration(@IntRange(from = 0) final long duration); long getRestoreHolderAnimationDuration(); void setRestoreHolderAnimationInterpolator(@NonNull final Interpolator interpolator); @NonNull Interpolator getRestoreHolderAnimationInterpolator(); boolean restoreHolder(@NonNull final RecyclerView.ViewHolder viewHolder, @Direction final int direction); boolean restoreHolder(
			@NonNull final RecyclerView.ViewHolder viewHolder,
			@Direction final int direction,
			@Nullable final Runnable animationCallback
	); }
ItemSwipeHelper extends RecyclerViewItemHelper<ItemSwipeHelper.Interactor> { public boolean restoreHolder(@NonNull final RecyclerView.ViewHolder viewHolder, @Direction final int direction) { return restoreHolder(viewHolder, direction, null); } ItemSwipeHelper(); private  ItemSwipeHelper(final Interactor interactor); static int makeSwipeFlags(@Movement final int movementFlags); void setRestoreHolderAnimationDuration(@IntRange(from = 0) final long duration); long getRestoreHolderAnimationDuration(); void setRestoreHolderAnimationInterpolator(@NonNull final Interpolator interpolator); @NonNull Interpolator getRestoreHolderAnimationInterpolator(); boolean restoreHolder(@NonNull final RecyclerView.ViewHolder viewHolder, @Direction final int direction); boolean restoreHolder(
			@NonNull final RecyclerView.ViewHolder viewHolder,
			@Direction final int direction,
			@Nullable final Runnable animationCallback
	); static final int INTERACTION; static final float SWIPE_THRESHOLD; static final long RESTORE_HOLDER_ANIMATION_DURATION; }