Created
January 11, 2021 22:02
-
-
Save afrishberg/255e03f6543dcb4d1b5dc71a8b5bf747 to your computer and use it in GitHub Desktop.
Adapter.kt
This file contains hidden or 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 onBindViewHolder(holder: ViewHolder, position: Int) { | |
val dataItem = data[position] | |
holder.textView.text = dataItem.id.toString() | |
holder.textView.animate().rotation( | |
if (dataItem.rotated) 180.0f else 0.0f | |
).setDuration(400).start() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment