Created
May 6, 2020 14:38
-
-
Save samiuelson/f20fd60d1f41c44e6de1f9bc8b35bfa3 to your computer and use it in GitHub Desktop.
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
class LiveStreamActivity : AppCompatActivity(R.layout.activity_main) { | |
private val adapter = MessagesListAdapter() | |
private val messageListSmoothScroller by lazy { | |
object : LinearSmoothScroller(this) { | |
val MILLISECONDS_PER_INCH = 400f | |
override fun calculateSpeedPerPixel(displayMetrics: DisplayMetrics?): Float { | |
return MILLISECONDS_PER_INCH / displayMetrics!!.densityDpi | |
} | |
} | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment