mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 19:38:08 +00:00
Use gray background for file preview in attachment area to increase contrast, improved remove file from attachments icon size and position
This commit is contained in:
parent
27e59a5f8b
commit
5256ee79c6
3 changed files with 16 additions and 6 deletions
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<corners android:radius="5dp" />
|
||||
<solid android:color="?attr/color_grey_100"/>
|
||||
</shape>
|
||||
|
|
@ -8,6 +8,9 @@
|
|||
<variable
|
||||
name="onLongClickListener"
|
||||
type="View.OnLongClickListener" />
|
||||
<variable
|
||||
name="useGrayBackground"
|
||||
type="Boolean" />
|
||||
<variable
|
||||
name="model"
|
||||
type="org.linphone.ui.main.chat.model.FileModel" />
|
||||
|
|
@ -22,7 +25,7 @@
|
|||
android:id="@+id/background"
|
||||
android:layout_width="@dimen/chat_bubble_grid_file_size"
|
||||
android:layout_height="@dimen/chat_bubble_grid_file_size"
|
||||
android:background="@drawable/shape_squircle_file_bubble_background"
|
||||
android:background="@{useGrayBackground ? @drawable/shape_squircle_file_bubble_gray_background : @drawable/shape_squircle_file_bubble_background, default=@drawable/shape_squircle_file_bubble_background}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@
|
|||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp">
|
||||
|
||||
<include
|
||||
android:id="@+id/media_layout"
|
||||
|
|
@ -31,16 +32,17 @@
|
|||
layout="@layout/chat_bubble_file_grid_cell"
|
||||
android:visibility="@{!model.isImage && !model.isVideoPreview ? View.VISIBLE : View.GONE}"
|
||||
bind:model="@{model}"
|
||||
bind:useGrayBackground="@{true}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/remove_attachment"
|
||||
android:onClick="@{() -> model.onClick()}"
|
||||
android:layout_width="@dimen/icon_size"
|
||||
android:layout_height="@dimen/icon_size"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:padding="3dp"
|
||||
android:src="@drawable/x"
|
||||
android:background="@drawable/shape_white_round"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue