Added icons to download/file attachments in chat

This commit is contained in:
Sylvain Berfini 2021-01-12 16:23:25 +01:00
parent acef505225
commit e33c859f9e
8 changed files with 17 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/download_disabled" android:state_enabled="false" />
<item android:drawable="@drawable/download_default" />
</selector>

View file

@ -53,10 +53,15 @@
android:textSize="12sp"
android:fontFamily="sans-serif"
android:textStyle="normal"
android:drawableTop="@drawable/file"
android:drawableTint="?attr/drawableTintColor2"
android:drawablePadding="5dp"
android:padding="5dp"
android:text="@{data.content.name}"
android:visibility="@{data.downloadable || data.image || data.video ? View.GONE : View.VISIBLE, default=gone}"
android:layout_width="150dp"
android:layout_height="100dp"
android:layout_height="match_parent"
android:maxHeight="100dp"
android:layout_margin="5dp"
android:background="@color/chat_bubble_text_color"
android:ellipsize="end"
@ -75,6 +80,8 @@
android:layout_margin="5dp"
android:textColor="@drawable/assistant_button_text_color"
android:background="@drawable/resizable_assistant_button"
android:drawableLeft="@drawable/download"
android:drawablePadding="10dp"
android:ellipsize="end"
android:padding="10dp" />

View file

@ -34,6 +34,7 @@
<item name="drawableTintColor">@color/white_color</item>
<item name="drawableTintDisabledColor">@color/light_grey_color</item>
<item name="drawableTintOverColor">@color/primary_color</item>
<item name="drawableTintColor2">@color/dark_grey_color</item>
<item name="lightToolbarBackgroundColor">@color/dark_grey_color</item>
<item name="lightToolbarBackgroundDisabledColor">@color/light_grey_color</item>

View file

@ -19,6 +19,7 @@
<attr name="drawableTintColor" format="color"/>
<attr name="drawableTintDisabledColor" format="color"/>
<attr name="drawableTintOverColor" format="color"/>
<attr name="drawableTintColor2" format="color"/>
<attr name="lightToolbarBackgroundColor" format="color"/>
<attr name="lightToolbarBackgroundDisabledColor" format="color"/>

View file

@ -35,6 +35,7 @@
<item name="drawableTintColor">@color/dark_grey_color</item>
<item name="drawableTintDisabledColor">@color/disabled_color</item>
<item name="drawableTintOverColor">@color/primary_color</item>
<item name="drawableTintColor2">@color/white_color</item>
<item name="lightToolbarBackgroundColor">@color/toolbar_color</item>
<item name="lightToolbarBackgroundDisabledColor">@color/light_grey_color</item>