message_recycler_view.let { recycler ->
....
recycler.addOnLayoutChangeListener { _, _, _, _, bottom, _, _, _, oldBottom ->
if (bottom < oldBottom) {
recycler.smoothScrollToPosition(oldBottom)
}
}
}
Скроллится только такой так! Пытался обернуть scrollToPosition
в post { }
, postDelayed()
, postOnAnimation { }
и т.п. Но работает только smoothScrollToPosition
... Что делать? Мне нужен прямой переход к View
.
addOnLayoutChangeListener
? – user194625 14 мар '18 в 21:22