mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
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:
parent
d9659219de
commit
76ac95756f
@ -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"/>
|
7
res/drawable/last_seen_divider_text_background_light.xml
Normal file
7
res/drawable/last_seen_divider_text_background_light.xml
Normal 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>
|
@ -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>
|
@ -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" />
|
||||
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user