Fix last seen divider crash on Android <5.0

Apparently, it's not possible to reference an attribute in an xml
drawable on API <21, so we have to use separate light and dark theme
drawables instead.

Closes #6285
This commit is contained in:
haffenloher 2017-02-22 16:47:52 +01:00
parent d9659219de
commit 76ac95756f
5 changed files with 12 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="?conversation_item_last_seen_text_background"/>
<solid android:color="#ff333333"/>
<corners android:radius="65dp"/>
<padding android:bottom="10dp" android:left="15dp" android:right="15dp" android:top="10dp"/>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="@color/white"/>
<corners android:radius="65dp"/>
<padding android:bottom="10dp" android:left="15dp" android:right="15dp" android:top="10dp"/>
</shape>

View File

@ -15,6 +15,6 @@
android:textSize="12sp"
android:textAllCaps="true"
android:textStyle="bold"
android:background="@drawable/last_seen_divider_text_background"
android:background="?conversation_item_last_seen_text_background"
tools:text="3 unread messages" />
</FrameLayout>

View File

@ -73,7 +73,7 @@
<attr name="conversation_item_sent_indicator_text_background" format="reference" />
<attr name="conversation_item_header_background" format="reference"/>
<attr name="conversation_item_last_seen_background" format="reference|color"/>
<attr name="conversation_item_last_seen_text_background" format="color"/>
<attr name="conversation_item_last_seen_text_background" format="reference"/>
<attr name="dialog_info_icon" format="reference" />
<attr name="dialog_alert_icon" format="reference" />

View File

@ -158,7 +158,7 @@
<item name="conversation_item_received_text_secondary_color">#BFffffff</item>
<item name="conversation_item_header_background">@drawable/conversation_item_header_background</item>
<item name="conversation_item_last_seen_background">@drawable/last_seen_background</item>
<item name="conversation_item_last_seen_text_background">@color/white</item>
<item name="conversation_item_last_seen_text_background">@drawable/last_seen_divider_text_background_light</item>
<item name="quick_camera_icon">@drawable/quick_camera_light</item>
<item name="quick_mic_icon">@drawable/ic_mic_grey600_24dp</item>
@ -247,7 +247,7 @@
<item name="conversation_item_sent_indicator_text_background">@drawable/conversation_item_sent_indicator_text_shape_dark</item>
<item name="conversation_item_header_background">@drawable/conversation_item_header_background_dark</item>
<item name="conversation_item_last_seen_background">#66333333</item>
<item name="conversation_item_last_seen_text_background">#ff333333</item>
<item name="conversation_item_last_seen_text_background">@drawable/last_seen_divider_text_background_dark</item>
<item name="verification_background">#ff333333</item>