From 7d7aeadd41eb5700223f23659012bab7e6cfe53e Mon Sep 17 00:00:00 2001 From: Conny Duck Date: Wed, 18 Oct 2017 11:08:49 +0200 Subject: [PATCH] improve content warning background --- .../main/res/drawable-v21/toggle_small.xml | 6 + .../res/drawable-v21/toggle_small_light.xml | 6 + app/src/main/res/drawable/toggle_small.9.png | Bin 413 -> 0 bytes app/src/main/res/drawable/toggle_small.xml | 21 ++ .../res/drawable/toggle_small_light.9.png | Bin 421 -> 0 bytes .../main/res/drawable/toggle_small_light.xml | 21 ++ app/src/main/res/layout/item_status.xml | 203 +++++++++--------- .../main/res/layout/item_status_detailed.xml | 5 +- 8 files changed, 162 insertions(+), 100 deletions(-) create mode 100644 app/src/main/res/drawable-v21/toggle_small.xml create mode 100644 app/src/main/res/drawable-v21/toggle_small_light.xml delete mode 100644 app/src/main/res/drawable/toggle_small.9.png create mode 100644 app/src/main/res/drawable/toggle_small.xml delete mode 100644 app/src/main/res/drawable/toggle_small_light.9.png create mode 100644 app/src/main/res/drawable/toggle_small_light.xml diff --git a/app/src/main/res/drawable-v21/toggle_small.xml b/app/src/main/res/drawable-v21/toggle_small.xml new file mode 100644 index 00000000..bf55fff0 --- /dev/null +++ b/app/src/main/res/drawable-v21/toggle_small.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable-v21/toggle_small_light.xml b/app/src/main/res/drawable-v21/toggle_small_light.xml new file mode 100644 index 00000000..5f27f87a --- /dev/null +++ b/app/src/main/res/drawable-v21/toggle_small_light.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/toggle_small.9.png b/app/src/main/res/drawable/toggle_small.9.png deleted file mode 100644 index 5b910ee2cb0bba6574d22ae096bced360ba53155..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 413 zcmV;O0b>4%P)K>QEca6zEqZz(j~ z7^wdN5Whz^TnK3R8ww3Kfg1h}W;iJMFahzX;h-=d4HiWD0;Y3})B?+?G)XNm!zs!{ z|NsB{_WbF6TU?olPh3i2Ju?%tBRLuA&+p&+UcG!&fRz2=WednWPF7ZKbwLr4Da=ev zhK!6%T*O-P``52S@7})Z`uq3iHKc+IrBq}FN(cb4Fch-`X^ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/toggle_small_light.9.png b/app/src/main/res/drawable/toggle_small_light.9.png deleted file mode 100644 index 24bb1f7ec074432f7a6661a43e0d63665ea0a42e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 421 zcmV;W0b2fvP)9ApQfALk95(Ocs+eJF@j3tikNc<#by|zn P00000NkvXXu0mjf=*q9Q diff --git a/app/src/main/res/drawable/toggle_small_light.xml b/app/src/main/res/drawable/toggle_small_light.xml new file mode 100644 index 00000000..4e2c89fa --- /dev/null +++ b/app/src/main/res/drawable/toggle_small_light.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_status.xml b/app/src/main/res/layout/item_status.xml index 0022cb11..2a3182c2 100644 --- a/app/src/main/res/layout/item_status.xml +++ b/app/src/main/res/layout/item_status.xml @@ -1,54 +1,54 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/status_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingLeft="16dp" + android:paddingRight="16dp"> + android:gravity="center_vertical" + android:orientation="horizontal"> + app:srcCompat="@drawable/ic_repeat_24dp" /> @@ -79,40 +79,40 @@ android:layout_height="wrap_content" android:layout_alignParentEnd="true" android:layout_alignParentRight="true" - android:layout_marginStart="4dp" android:layout_marginLeft="4dp" + android:layout_marginStart="4dp" android:textColor="?android:textColorSecondary" /> + android:orientation="horizontal"> + android:paddingLeft="0dp" + android:paddingRight="@dimen/status_display_name_right_padding" + android:paddingStart="0dp" + android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" + android:textColor="?android:textColorPrimary" + android:textStyle="normal|bold" /> + android:textColor="?android:textColorSecondary" /> @@ -140,9 +140,14 @@ android:id="@+id/status_content_warning_button" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginBottom="6dp" android:background="?attr/content_warning_button" android:minHeight="0dp" android:minWidth="0dp" + android:paddingBottom="3dp" + android:paddingLeft="6dp" + android:paddingRight="6dp" + android:paddingTop="3dp" android:textAllCaps="true" android:textOff="@string/status_content_warning_show_more" android:textOn="@string/status_content_warning_show_less" @@ -154,14 +159,14 @@ android:id="@+id/status_content" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="?android:textColorPrimary" - android:layout_marginBottom="4dp" - android:layout_toRightOf="@+id/status_avatar" - android:layout_toEndOf="@+id/status_avatar" android:layout_alignParentEnd="true" android:layout_alignParentRight="true" android:layout_below="@+id/status_content_warning_bar" - android:focusable="true" /> + android:layout_marginBottom="4dp" + android:layout_toEndOf="@+id/status_avatar" + android:layout_toRightOf="@+id/status_avatar" + android:focusable="true" + android:textColor="?android:textColorPrimary" /> + android:layout_height="wrap_content" + android:orientation="vertical"> + android:orientation="horizontal"> + android:layout_weight="1" + android:contentDescription="@string/action_view_media" + android:scaleType="centerCrop" /> + android:layout_weight="1" + android:contentDescription="@string/action_view_media" + android:scaleType="centerCrop" /> + android:orientation="horizontal"> + android:layout_weight="1" + android:contentDescription="@string/action_view_media" + android:scaleType="centerCrop" /> + android:contentDescription="@string/action_view_media" + android:scaleType="centerCrop" /> @@ -241,25 +246,25 @@ android:layout_height="match_parent"> + android:visibility="gone" + app:srcCompat="@drawable/ic_play_48dp" /> + android:visibility="gone" + app:srcCompat="@drawable/ic_remove_red_eye_black_24dp" /> + android:includeFontPadding="false" + android:visibility="gone" /> + app:srcCompat="@drawable/ic_reply_24dp" /> + android:padding="4dp" + app:sparkbutton_activeImage="@drawable/reblog_active" + app:sparkbutton_iconSize="28dp" + app:sparkbutton_inActiveImage="?attr/status_reblog_inactive_drawable" + app:sparkbutton_primaryColor="@color/status_reblog_button_marked_dark" + app:sparkbutton_secondaryColor="@color/status_reblog_button_marked_light" /> + android:padding="4dp" + app:sparkbutton_activeImage="?attr/status_favourite_active_drawable" + app:sparkbutton_iconSize="28dp" + app:sparkbutton_inActiveImage="?attr/status_favourite_inactive_drawable" + app:sparkbutton_primaryColor="@color/status_favourite_button_marked_dark" + app:sparkbutton_secondaryColor="@color/status_favourite_button_marked_light" /> + app:srcCompat="@drawable/ic_more_horiz_24dp" />