Fix blink effect when opening the attachment popup, and improve clickability of the buttons
This commit is contained in:
parent
cc8da82d02
commit
464ac3bce2
|
@ -42,4 +42,9 @@
|
||||||
|
|
||||||
<!-- Preview Url -->
|
<!-- Preview Url -->
|
||||||
<dimen name="preview_url_view_corner_radius">8dp</dimen>
|
<dimen name="preview_url_view_corner_radius">8dp</dimen>
|
||||||
|
|
||||||
|
<!-- Composer -->
|
||||||
|
<dimen name="composer_min_height">56dp</dimen>
|
||||||
|
<dimen name="composer_attachment_size">52dp</dimen>
|
||||||
|
<dimen name="composer_attachment_margin">1dp</dimen>
|
||||||
</resources>
|
</resources>
|
|
@ -108,9 +108,9 @@
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/attachmentButton"
|
android:id="@+id/attachmentButton"
|
||||||
android:layout_width="52dp"
|
android:layout_width="@dimen/composer_attachment_size"
|
||||||
android:layout_height="52dp"
|
android:layout_height="@dimen/composer_attachment_size"
|
||||||
android:layout_margin="1dp"
|
android:layout_margin="@dimen/composer_attachment_margin"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:contentDescription="@string/option_send_files"
|
android:contentDescription="@string/option_send_files"
|
||||||
android:src="@drawable/ic_attachment"
|
android:src="@drawable/ic_attachment"
|
||||||
|
@ -166,7 +166,7 @@
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/sendButton"
|
android:id="@+id/sendButton"
|
||||||
android:layout_width="56dp"
|
android:layout_width="56dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="@dimen/composer_min_height"
|
||||||
android:layout_marginEnd="2dp"
|
android:layout_marginEnd="2dp"
|
||||||
android:background="@drawable/bg_send"
|
android:background="@drawable/bg_send"
|
||||||
android:contentDescription="@string/send"
|
android:contentDescription="@string/send"
|
||||||
|
|
|
@ -121,9 +121,9 @@
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/attachmentButton"
|
android:id="@+id/attachmentButton"
|
||||||
android:layout_width="52dp"
|
android:layout_width="@dimen/composer_attachment_size"
|
||||||
android:layout_height="52dp"
|
android:layout_height="@dimen/composer_attachment_size"
|
||||||
android:layout_margin="1dp"
|
android:layout_margin="@dimen/composer_attachment_margin"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:contentDescription="@string/option_send_files"
|
android:contentDescription="@string/option_send_files"
|
||||||
android:src="@drawable/ic_attachment"
|
android:src="@drawable/ic_attachment"
|
||||||
|
@ -178,7 +178,7 @@
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/sendButton"
|
android:id="@+id/sendButton"
|
||||||
android:layout_width="56dp"
|
android:layout_width="56dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="@dimen/composer_min_height"
|
||||||
android:layout_marginEnd="2dp"
|
android:layout_marginEnd="2dp"
|
||||||
android:background="@drawable/bg_send"
|
android:background="@drawable/bg_send"
|
||||||
android:contentDescription="@string/send"
|
android:contentDescription="@string/send"
|
||||||
|
|
|
@ -2,17 +2,15 @@
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/composer_min_height"
|
||||||
android:background="?android:colorBackground"
|
android:background="?android:colorBackground">
|
||||||
android:paddingTop="12dp"
|
|
||||||
android:paddingBottom="12dp">
|
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/attachmentCloseButton"
|
android:id="@+id/attachmentCloseButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/composer_attachment_size"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/composer_attachment_size"
|
||||||
android:layout_marginStart="12dp"
|
android:layout_margin="@dimen/composer_attachment_margin"
|
||||||
android:background="@drawable/circle"
|
android:background="@null"
|
||||||
android:contentDescription="@string/action_close"
|
android:contentDescription="@string/action_close"
|
||||||
android:src="@drawable/ic_attachment_close"
|
android:src="@drawable/ic_attachment_close"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
@ -22,7 +20,7 @@
|
||||||
<HorizontalScrollView
|
<HorizontalScrollView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="4dp"
|
||||||
android:scrollbars="none"
|
android:scrollbars="none"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
@ -32,77 +30,80 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/attachmentGalleryButton"
|
android:id="@+id/attachmentGalleryButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/layout_touch_size"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/layout_touch_size"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:contentDescription="@string/attachment_type_gallery"
|
android:contentDescription="@string/attachment_type_gallery"
|
||||||
android:src="@drawable/ic_attachment_gallery" />
|
android:src="@drawable/ic_attachment_gallery" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/attachmentStickersButton"
|
android:id="@+id/attachmentStickersButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/layout_touch_size"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/layout_touch_size"
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="2dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:contentDescription="@string/attachment_type_sticker"
|
android:contentDescription="@string/attachment_type_sticker"
|
||||||
android:src="@drawable/ic_attachment_sticker" />
|
android:src="@drawable/ic_attachment_sticker"
|
||||||
|
app:tint="?colorPrimary" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/attachmentFileButton"
|
android:id="@+id/attachmentFileButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/layout_touch_size"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/layout_touch_size"
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="2dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:contentDescription="@string/attachment_type_file"
|
android:contentDescription="@string/attachment_type_file"
|
||||||
android:src="@drawable/ic_attachment_file" />
|
android:src="@drawable/ic_attachment_file"
|
||||||
|
app:tint="?colorPrimary" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/attachmentPollButton"
|
android:id="@+id/attachmentPollButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/layout_touch_size"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/layout_touch_size"
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="2dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:contentDescription="@string/attachment_type_poll"
|
android:contentDescription="@string/attachment_type_poll"
|
||||||
android:src="@drawable/ic_attachment_poll" />
|
android:src="@drawable/ic_attachment_poll"
|
||||||
|
app:tint="?colorPrimary" />
|
||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/attachmentCameraButton"
|
android:id="@+id/attachmentCameraButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/layout_touch_size"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/layout_touch_size"
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="2dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:contentDescription="@string/attachment_type_camera"
|
android:contentDescription="@string/attachment_type_camera"
|
||||||
android:src="@drawable/ic_attachment_camera" />
|
android:src="@drawable/ic_attachment_camera"
|
||||||
|
app:tint="?colorPrimary" />
|
||||||
|
|
||||||
<!-- TODO. Request for new icon and remove tint color later -->
|
<!-- TODO. Request for new icon -->
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/attachmentAudioButton"
|
android:id="@+id/attachmentAudioButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/layout_touch_size"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/layout_touch_size"
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="2dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:contentDescription="@string/attachment_type_audio"
|
android:contentDescription="@string/attachment_type_audio"
|
||||||
android:src="@drawable/ic_attachment_audio_white_24dp"
|
android:src="@drawable/ic_attachment_audio_white_24dp"
|
||||||
app:tint="?colorPrimary" />
|
app:tint="?colorPrimary" />
|
||||||
|
|
||||||
<!-- TODO. Request for new icon and remove tint color later -->
|
<!-- TODO. Request for new icon -->
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/attachmentContactButton"
|
android:id="@+id/attachmentContactButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="@dimen/layout_touch_size"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/layout_touch_size"
|
||||||
android:layout_marginStart="24dp"
|
android:layout_marginStart="2dp"
|
||||||
android:background="?android:attr/selectableItemBackground"
|
android:background="?android:attr/selectableItemBackground"
|
||||||
android:contentDescription="@string/attachment_type_contact"
|
android:contentDescription="@string/attachment_type_contact"
|
||||||
android:src="@drawable/ic_attachment_contact_white_24dp"
|
android:src="@drawable/ic_attachment_contact_white_24dp"
|
||||||
app:tint="?colorPrimary" />
|
app:tint="?colorPrimary" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/voiceMessageSendButton"
|
android:id="@+id/voiceMessageSendButton"
|
||||||
android:layout_width="56dp"
|
android:layout_width="56dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="@dimen/composer_min_height"
|
||||||
android:background="@drawable/bg_send"
|
android:background="@drawable/bg_send"
|
||||||
android:contentDescription="@string/send"
|
android:contentDescription="@string/send"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
|
@ -232,8 +232,8 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="84dp"
|
android:layout_marginBottom="84dp"
|
||||||
android:visibility="gone"
|
|
||||||
android:accessibilityLiveRegion="polite"
|
android:accessibilityLiveRegion="polite"
|
||||||
|
android:visibility="gone"
|
||||||
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"
|
||||||
|
|
Loading…
Reference in New Issue