Skip to content

Instantly share code, notes, and snippets.

@saturov
Created August 16, 2018 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saturov/29566e3e9912fb75a471425e4ce5e19b to your computer and use it in GitHub Desktop.
Save saturov/29566e3e9912fb75a471425e4ce5e19b to your computer and use it in GitHub Desktop.
if (rateViewInRecyclerView != null) {
val offset: Float
if (rateViewInRecyclerView.top < post_rate_container.top) {
offset = (rateViewInRecyclerView.top - post_rate_container.top).toFloat()
post_rate_container.animate().yBy(offset).setDuration(0)?.start()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment