use proper paddings in dialogs on android < 5

This commit is contained in:
Daniel Gultsch 2016-09-18 20:09:39 +02:00
parent 7bdd4166c0
commit 6b904d4de1
7 changed files with 43 additions and 20 deletions

View File

@ -3,10 +3,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="8dp" android:paddingBottom="?attr/dialog_vertical_padding"
android:paddingLeft="24dp" android:paddingLeft="?attr/dialog_horizontal_padding"
android:paddingRight="24dp" android:paddingRight="?attr/dialog_horizontal_padding"
android:paddingTop="16dp"> android:paddingTop="?attr/dialog_vertical_padding">
<TextView <TextView
android:id="@+id/your_account" android:id="@+id/your_account"

View File

@ -3,11 +3,15 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:padding="8dp" > android:paddingLeft="?attr/dialog_horizontal_padding"
android:paddingRight="?attr/dialog_horizontal_padding"
android:paddingBottom="?attr/dialog_vertical_padding"
android:paddingTop="?attr/dialog_vertical_padding">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="?attr/color_text_primary"
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:text="@string/clear_histor_msg" android:text="@string/clear_histor_msg"
android:textSize="?attr/TextSizeBody" /> android:textSize="?attr/TextSizeBody" />
@ -15,6 +19,7 @@
<CheckBox <CheckBox
android:id="@+id/end_conversation_checkbox" android:id="@+id/end_conversation_checkbox"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:textColor="?attr/color_text_primary"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/also_end_conversation" /> android:text="@string/also_end_conversation" />

View File

@ -3,7 +3,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:padding="16dp" > android:paddingLeft="?attr/dialog_horizontal_padding"
android:paddingRight="?attr/dialog_horizontal_padding"
android:paddingBottom="?attr/dialog_vertical_padding"
android:paddingTop="?attr/dialog_vertical_padding">
<TextView <TextView
android:id="@+id/password" android:id="@+id/password"

View File

@ -3,10 +3,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:paddingBottom="8dp" android:paddingBottom="?attr/dialog_vertical_padding"
android:paddingLeft="24dp" android:paddingLeft="?attr/dialog_horizontal_padding"
android:paddingRight="24dp" android:paddingRight="?attr/dialog_horizontal_padding"
android:paddingTop="16dp"> android:paddingTop="?attr/dialog_vertical_padding">
<TextView <TextView
android:id="@+id/your_account" android:id="@+id/your_account"

View File

@ -37,6 +37,9 @@
<item name="attr/icon_alpha">0.54</item> <item name="attr/icon_alpha">0.54</item>
<item name="attr/dialog_horizontal_padding">24dp</item>
<item name="attr/dialog_vertical_padding">16dp</item>
<item name="attr/icon_add_group">@drawable/ic_group_add_white_24dp</item> <item name="attr/icon_add_group">@drawable/ic_group_add_white_24dp</item>
<item name="attr/icon_add_person">@drawable/ic_person_add_white_24dp</item> <item name="attr/icon_add_person">@drawable/ic_person_add_white_24dp</item>
<item name="attr/icon_cancel">@drawable/ic_cancel_white_24dp</item> <item name="attr/icon_cancel">@drawable/ic_cancel_white_24dp</item>
@ -100,6 +103,9 @@
<item name="attr/icon_alpha">1.0</item> <item name="attr/icon_alpha">1.0</item>
<item name="attr/dialog_horizontal_padding">24dp</item>
<item name="attr/dialog_vertical_padding">16dp</item>
<item name="attr/icon_add_group">@drawable/ic_group_add_white_24dp</item> <item name="attr/icon_add_group">@drawable/ic_group_add_white_24dp</item>
<item name="attr/icon_add_person">@drawable/ic_person_add_white_24dp</item> <item name="attr/icon_add_person">@drawable/ic_person_add_white_24dp</item>
<item name="attr/icon_cancel">@drawable/ic_cancel_white_24dp</item> <item name="attr/icon_cancel">@drawable/ic_cancel_white_24dp</item>

View File

@ -53,4 +53,7 @@
<attr name="icon_notifications_paused" format="reference"/> <attr name="icon_notifications_paused" format="reference"/>
<attr name="icon_notifications_none" format="reference"/> <attr name="icon_notifications_none" format="reference"/>
<attr name="dialog_horizontal_padding" format="dimension"/>
<attr name="dialog_vertical_padding" format="dimension"/>
</resources> </resources>

View File

@ -43,6 +43,9 @@
<item name="attr/icon_alpha">1.0</item> <item name="attr/icon_alpha">1.0</item>
<item name="attr/dialog_horizontal_padding">16dp</item>
<item name="attr/dialog_vertical_padding">16dp</item>
<item name="attr/icon_group">@drawable/ic_action_group</item> <item name="attr/icon_group">@drawable/ic_action_group</item>
<item name="attr/icon_new">@drawable/ic_action_new</item> <item name="attr/icon_new">@drawable/ic_action_new</item>
<item name="attr/icon_new_attachment">@drawable/ic_action_new_attachment</item> <item name="attr/icon_new_attachment">@drawable/ic_action_new_attachment</item>
@ -93,6 +96,9 @@
<item name="attr/icon_alpha">1.0</item> <item name="attr/icon_alpha">1.0</item>
<item name="attr/dialog_horizontal_padding">16dp</item>
<item name="attr/dialog_vertical_padding">16dp</item>
<item name="attr/icon_add_group">@drawable/ic_action_add_group</item> <item name="attr/icon_add_group">@drawable/ic_action_add_group</item>
<item name="attr/icon_add_person">@drawable/ic_action_add_person</item> <item name="attr/icon_add_person">@drawable/ic_action_add_person</item>
<item name="attr/icon_cancel">@drawable/ic_action_cancel</item> <item name="attr/icon_cancel">@drawable/ic_action_cancel</item>