Better alignment of button and animation, bigger touch area for send button

This commit is contained in:
Benoit Marty 2020-12-11 12:41:35 +01:00
parent 705b6176f1
commit 32fd3be732
3 changed files with 22 additions and 18 deletions

View File

@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item> <item
android:bottom="10dp"
android:left="10dp"
android:right="10dp"
android:top="10dp">
<shape android:shape="oval"> <shape android:shape="oval">
<solid android:color="@color/riotx_accent" /> <solid android:color="@color/riotx_accent" />
</shape> </shape>

View File

@ -102,20 +102,20 @@
android:layout_margin="12dp" android:layout_margin="12dp"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:src="@drawable/ic_attachment" android:src="@drawable/ic_attachment"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="@id/sendButton"
app:layout_constraintEnd_toStartOf="@+id/composer_shield" app:layout_constraintEnd_toStartOf="@+id/composer_shield"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="@id/sendButton"
tools:ignore="MissingPrefix" /> tools:ignore="MissingPrefix" />
<ImageView <ImageView
android:id="@+id/composer_shield" android:id="@+id/composer_shield"
android:layout_width="16dp" android:layout_width="16dp"
android:layout_height="16dp" android:layout_height="16dp"
app:layout_constraintBottom_toBottomOf="@id/attachmentButton" app:layout_constraintBottom_toBottomOf="@id/sendButton"
app:layout_constraintEnd_toStartOf="@+id/composerEditText" app:layout_constraintEnd_toStartOf="@+id/composerEditText"
app:layout_constraintStart_toEndOf="@+id/attachmentButton" app:layout_constraintStart_toEndOf="@+id/attachmentButton"
app:layout_constraintTop_toTopOf="@id/attachmentButton" app:layout_constraintTop_toTopOf="@id/sendButton"
tools:src="@drawable/ic_shield_black" tools:src="@drawable/ic_shield_black"
tools:visibility="visible" /> tools:visibility="visible" />
@ -145,11 +145,11 @@
<ImageButton <ImageButton
android:id="@+id/sendButton" android:id="@+id/sendButton"
android:layout_width="36dp" android:layout_width="56dp"
android:layout_height="36dp" android:layout_height="56dp"
android:layout_marginEnd="12dp" android:layout_marginEnd="2dp"
android:layout_marginBottom="10dp"
android:background="@drawable/bg_send" android:background="@drawable/bg_send"
android:scaleType="center"
android:src="@drawable/ic_send" android:src="@drawable/ic_send"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -106,8 +106,9 @@
android:layout_height="48dp" android:layout_height="48dp"
android:background="?android:attr/selectableItemBackground" android:background="?android:attr/selectableItemBackground"
android:src="@drawable/ic_attachment" android:src="@drawable/ic_attachment"
app:layout_constraintStart_toStartOf="@id/composerEditText" app:layout_constraintBottom_toBottomOf="@+id/sendButton"
app:layout_constraintTop_toBottomOf="parent" app:layout_constraintEnd_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/sendButton"
tools:ignore="MissingPrefix" /> tools:ignore="MissingPrefix" />
<ImageView <ImageView
@ -115,10 +116,10 @@
android:layout_width="16dp" android:layout_width="16dp"
android:layout_height="16dp" android:layout_height="16dp"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
app:layout_constraintBottom_toBottomOf="@id/composer_emoji" app:layout_constraintBottom_toBottomOf="@+id/sendButton"
app:layout_constraintEnd_toStartOf="@+id/composerEditText" app:layout_constraintEnd_toStartOf="@+id/composerEditText"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/composer_emoji" app:layout_constraintTop_toTopOf="@+id/sendButton"
tools:src="@drawable/ic_shield_black" /> tools:src="@drawable/ic_shield_black" />
<ImageButton <ImageButton
@ -147,13 +148,12 @@
<ImageButton <ImageButton
android:id="@+id/sendButton" android:id="@+id/sendButton"
android:layout_width="36dp" android:layout_width="56dp"
android:layout_height="36dp" android:layout_height="56dp"
android:layout_marginEnd="2dp"
android:background="@drawable/bg_send" android:background="@drawable/bg_send"
android:scaleType="center"
android:src="@drawable/ic_send" android:src="@drawable/ic_send"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_marginEnd="12dp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/composer_preview_barrier" app:layout_constraintTop_toBottomOf="@id/composer_preview_barrier"