Created
April 28, 2019 01:50
-
-
Save CodeK1988/97bc95f65e46737d82fe971473e25d14 to your computer and use it in GitHub Desktop.
Recyclerview 无限滑动
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun getItemCount(): Int { | |
return Int.MAX_VALUE | |
} | |
override fun onBindViewHolder(holder: CustomPlanViewHolder, position: Int) { | |
if (list.isNotEmpty()) { | |
holder.bind(list[position % list.size]) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment