VP2RV icon indicating copy to clipboard operation
VP2RV copied to clipboard

recyclerView.getChildAdapterPosition() is annotated as nonNull

Open CristianSarac opened this issue 7 years ago • 2 comments

I was trying to use the Core package but in PagerSnapHelperVerbose the fun findSnapView uses a recyclerView.getChildAdapterPosition(view) and in androidX namepsace/packages the view is annotated as NonNull and this causes some problems. However when i checked out this repository in the support libraries the same fun is not annotated as NonNull. Do you have any insight on how to fix this issue ?

CristianSarac avatar Dec 18 '18 13:12 CristianSarac

have the same issue.

smithshelke avatar Jan 01 '20 07:01 smithshelke

Hi, i had also face the same issue, just use below code override fun findSnapView(layoutManager: RecyclerView.LayoutManager?): View? { val view = super.findSnapView(layoutManager) if(view !=null){ notifyNewPageIfNeeded(recyclerView.getChildAdapterPosition(view!!))} return view }

sunildholpuria avatar Feb 18 '20 13:02 sunildholpuria