Package com.my.target.nativeads.views
Class PromoCardSnapHelper
-
- All Implemented Interfaces:
public final class PromoCardSnapHelper extends SnapHelperImplementation of the SnapHelper supporting pager style snapping in horizontal orientation.
SnapHelper can help achieve a similar behavior to androidx.viewpager.widget.ViewPager. Set both RecyclerView and the items of the RecyclerView.Adapter to have MATCH_PARENT height and width and then attach PagerSnapHelper to the RecyclerView using attachToRecyclerView.
-
-
Method Summary
Modifier and Type Method Description Array<int>calculateDistanceToFinalSnap(@NonNull() RecyclerView.LayoutManager layoutManager, @NonNull() View targetView)ViewfindSnapView(@NonNull() RecyclerView.LayoutManager layoutManager)intfindTargetSnapPosition(@NonNull() RecyclerView.LayoutManager layoutManager, int velocityX, int velocityY)-
-
Method Detail
-
calculateDistanceToFinalSnap
@NonNull() Array<int> calculateDistanceToFinalSnap(@NonNull() RecyclerView.LayoutManager layoutManager, @NonNull() View targetView)
-
findSnapView
@Nullable() View findSnapView(@NonNull() RecyclerView.LayoutManager layoutManager)
-
findTargetSnapPosition
int findTargetSnapPosition(@NonNull() RecyclerView.LayoutManager layoutManager, int velocityX, int velocityY)
-
-
-
-