Set composeview layoutmanagers in xml

This commit is contained in:
Moez Bhatti
2018-03-13 02:04:42 -07:00
parent bf9ba6c7ca
commit 2684d549a8
3 changed files with 7 additions and 7 deletions
@@ -87,12 +87,10 @@ class ComposeActivity : QkThemedActivity<ComposeViewModel>(), ComposeView {
chipsAdapter.view = chips
contacts.itemAnimator = null
chips.itemAnimator = null
chips.layoutManager = FlexboxLayoutManager(this)
contacts.itemAnimator = null
contacts.layoutManager = LinearLayoutManager(this)
val layoutManager = LinearLayoutManager(this).apply { stackFromEnd = true }
messageAdapter.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() {
@@ -125,7 +123,6 @@ class ComposeActivity : QkThemedActivity<ComposeViewModel>(), ComposeView {
messageList.layoutManager = layoutManager
messageList.adapter = messageAdapter
attachments.layoutManager = LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)
attachments.adapter = attachmentAdapter
messageBackground.backgroundTintMode = PorterDuff.Mode.MULTIPLY