make notification icon size depend on 'Large Text' setting

This commit is contained in:
Daniel Gultsch 2017-03-03 11:55:07 +01:00
parent 8cce653a1f
commit 469cf72e56
4 changed files with 13 additions and 2 deletions

View file

@ -67,6 +67,8 @@
android:id="@+id/conversation_lastmsg" android:id="@+id/conversation_lastmsg"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="?attr/IconSize"
android:gravity="center_vertical"
android:scrollHorizontally="false" android:scrollHorizontally="false"
android:singleLine="true" android:singleLine="true"
android:text="This is a placeholder text to show the last messages" android:text="This is a placeholder text to show the last messages"
@ -83,9 +85,10 @@
app:riv_corner_radius="2dp"/> app:riv_corner_radius="2dp"/>
</LinearLayout> </LinearLayout>
<ImageView <ImageView
android:visibility="visible"
android:id="@+id/notification_status" android:id="@+id/notification_status"
android:layout_width="16sp" android:layout_width="?attr/IconSize"
android:layout_height="16sp" android:layout_height="?attr/IconSize"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="4dp" android:layout_marginLeft="4dp"

View file

@ -17,6 +17,7 @@
<item name="TextSizeInfo">12sp</item> <item name="TextSizeInfo">12sp</item>
<item name="TextSizeBody">14sp</item> <item name="TextSizeBody">14sp</item>
<item name="IconSize">18sp</item>
<item name="TextSizeHeadline">20sp</item> <item name="TextSizeHeadline">20sp</item>
<item name="attr/infocard_border">@drawable/infocard_border</item> <item name="attr/infocard_border">@drawable/infocard_border</item>
@ -85,6 +86,7 @@
<item name="TextSizeInfo">12sp</item> <item name="TextSizeInfo">12sp</item>
<item name="TextSizeBody">14sp</item> <item name="TextSizeBody">14sp</item>
<item name="IconSize">18sp</item>
<item name="TextSizeHeadline">20sp</item> <item name="TextSizeHeadline">20sp</item>
<item name="attr/infocard_border">@drawable/infocard_border_dark</item> <item name="attr/infocard_border">@drawable/infocard_border_dark</item>

View file

@ -5,6 +5,8 @@
<attr name="TextSizeBody" format="dimension" /> <attr name="TextSizeBody" format="dimension" />
<attr name="TextSizeHeadline" format="dimension" /> <attr name="TextSizeHeadline" format="dimension" />
<attr name="IconSize" format="dimension"/>
<attr name="color_text_primary" format="reference|color" /> <attr name="color_text_primary" format="reference|color" />
<attr name="color_text_secondary" format="reference|color" /> <attr name="color_text_secondary" format="reference|color" />

View file

@ -8,6 +8,7 @@
<item name="TextSizeInfo">12sp</item> <item name="TextSizeInfo">12sp</item>
<item name="TextSizeBody">14sp</item> <item name="TextSizeBody">14sp</item>
<item name="TextSizeHeadline">20sp</item> <item name="TextSizeHeadline">20sp</item>
<item name="IconSize">18sp</item>
<item name="attr/color_text_primary">@color/black87</item> <item name="attr/color_text_primary">@color/black87</item>
<item name="attr/color_text_secondary">@color/black54</item> <item name="attr/color_text_secondary">@color/black54</item>
@ -72,6 +73,7 @@
<item name="android:actionBarTabStyle">@style/ConversationsActionBarTabs</item> <item name="android:actionBarTabStyle">@style/ConversationsActionBarTabs</item>
<item name="TextSizeInfo">12sp</item> <item name="TextSizeInfo">12sp</item>
<item name="TextSizeBody">14sp</item> <item name="TextSizeBody">14sp</item>
<item name="IconSize">18sp</item>
<item name="TextSizeHeadline">20sp</item> <item name="TextSizeHeadline">20sp</item>
<item name="attr/color_text_primary">@color/white</item> <item name="attr/color_text_primary">@color/white</item>
@ -134,12 +136,14 @@
<style name="ConversationsTheme.LargerText" parent="ConversationsTheme"> <style name="ConversationsTheme.LargerText" parent="ConversationsTheme">
<item name="TextSizeInfo">14sp</item> <item name="TextSizeInfo">14sp</item>
<item name="TextSizeBody">16sp</item> <item name="TextSizeBody">16sp</item>
<item name="IconSize">20sp</item>
<item name="TextSizeHeadline">22sp</item> <item name="TextSizeHeadline">22sp</item>
</style> </style>
<style name="ConversationsTheme.Dark.LargerText" parent="ConversationsTheme.Dark"> <style name="ConversationsTheme.Dark.LargerText" parent="ConversationsTheme.Dark">
<item name="TextSizeInfo">14sp</item> <item name="TextSizeInfo">14sp</item>
<item name="TextSizeBody">16sp</item> <item name="TextSizeBody">16sp</item>
<item name="IconSize">20sp</item>
<item name="TextSizeHeadline">22sp</item> <item name="TextSizeHeadline">22sp</item>
</style> </style>