mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-22 21:58:53 +01:00
Set composeview layoutmanagers in xml
This commit is contained in:
@@ -87,12 +87,10 @@ class ComposeActivity : QkThemedActivity<ComposeViewModel>(), ComposeView {
|
|||||||
|
|
||||||
chipsAdapter.view = chips
|
chipsAdapter.view = chips
|
||||||
|
|
||||||
|
contacts.itemAnimator = null
|
||||||
chips.itemAnimator = null
|
chips.itemAnimator = null
|
||||||
chips.layoutManager = FlexboxLayoutManager(this)
|
chips.layoutManager = FlexboxLayoutManager(this)
|
||||||
|
|
||||||
contacts.itemAnimator = null
|
|
||||||
contacts.layoutManager = LinearLayoutManager(this)
|
|
||||||
|
|
||||||
val layoutManager = LinearLayoutManager(this).apply { stackFromEnd = true }
|
val layoutManager = LinearLayoutManager(this).apply { stackFromEnd = true }
|
||||||
|
|
||||||
messageAdapter.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() {
|
messageAdapter.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() {
|
||||||
@@ -125,7 +123,6 @@ class ComposeActivity : QkThemedActivity<ComposeViewModel>(), ComposeView {
|
|||||||
messageList.layoutManager = layoutManager
|
messageList.layoutManager = layoutManager
|
||||||
messageList.adapter = messageAdapter
|
messageList.adapter = messageAdapter
|
||||||
|
|
||||||
attachments.layoutManager = LinearLayoutManager(this, LinearLayoutManager.HORIZONTAL, false)
|
|
||||||
attachments.adapter = attachmentAdapter
|
attachments.adapter = attachmentAdapter
|
||||||
|
|
||||||
messageBackground.backgroundTintMode = PorterDuff.Mode.MULTIPLY
|
messageBackground.backgroundTintMode = PorterDuff.Mode.MULTIPLY
|
||||||
|
|||||||
@@ -20,8 +20,7 @@
|
|||||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
tools:background="@color/backgroundLight">
|
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/thumbnailBounds"
|
android:id="@+id/thumbnailBounds"
|
||||||
|
|||||||
@@ -80,6 +80,7 @@
|
|||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
|
app:layoutManager="android.support.v7.widget.LinearLayoutManager"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
@@ -122,14 +123,17 @@
|
|||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
|
android:orientation="horizontal"
|
||||||
android:paddingEnd="8dp"
|
android:paddingEnd="8dp"
|
||||||
android:paddingStart="8dp"
|
android:paddingStart="8dp"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
|
app:layoutManager="android.support.v7.widget.LinearLayoutManager"
|
||||||
app:layout_constraintBottom_toTopOf="@id/message"
|
app:layout_constraintBottom_toTopOf="@id/message"
|
||||||
app:layout_constraintEnd_toEndOf="@id/messageBackground"
|
app:layout_constraintEnd_toEndOf="@id/messageBackground"
|
||||||
app:layout_constraintHeight_default="wrap"
|
app:layout_constraintHeight_default="wrap"
|
||||||
app:layout_constraintStart_toStartOf="@id/messageBackground"
|
app:layout_constraintStart_toStartOf="@id/messageBackground"
|
||||||
app:layout_constraintTop_toTopOf="@id/messageBackground" />
|
app:layout_constraintTop_toTopOf="@id/messageBackground"
|
||||||
|
tools:listitem="@layout/attachment_list_item" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/attach"
|
android:id="@+id/attach"
|
||||||
|
|||||||
Reference in New Issue
Block a user