From fa4132ca819f28e8428c46062e0d306c9ebb0b52 Mon Sep 17 00:00:00 2001 From: Thodoris1999 Date: Sat, 1 Sep 2018 13:18:31 +0300 Subject: [PATCH] ui in editor view --- ...ic_code_grey_36dp.xml => ic_code_grey.xml} | 4 +- ...dp.xml => ic_format_align_center_grey.xml} | 4 +- ...36dp.xml => ic_format_align_left_grey.xml} | 4 +- ...6dp.xml => ic_format_align_right_grey.xml} | 4 +- ..._grey_36dp.xml => ic_format_bold_grey.xml} | 4 +- ...text_36dp.xml => ic_format_color_text.xml} | 4 +- .../res/drawable/ic_format_italic_grey.xml | 4 ++ .../drawable/ic_format_italic_grey_36dp.xml | 4 -- ....xml => ic_format_list_bulleted_black.xml} | 4 +- .../res/drawable/ic_format_quote_grey.xml | 5 ++ .../res/drawable/ic_format_size_black.xml | 5 ++ .../drawable/ic_format_size_black_36dp.xml | 5 -- ...36dp.xml => ic_format_underlined_grey.xml} | 4 +- .../main/res/drawable/ic_functions_black.xml | 5 ++ .../res/drawable/ic_functions_black_36dp.xml | 5 -- ...k_gre_36dp.xml => ic_insert_link_grey.xml} | 4 +- ...y_36dp.xml => ic_strikethrough_s_grey.xml} | 4 +- ..._grey_36dp.xml => ic_text_format_grey.xml} | 4 +- .../layout/activity_topic_quick_reply_row.xml | 2 + app/src/main/res/layout/editor_view.xml | 49 ++++++++++++------- app/src/main/res/values/dimens.xml | 2 + 21 files changed, 76 insertions(+), 54 deletions(-) rename app/src/main/res/drawable/{ic_code_grey_36dp.xml => ic_code_grey.xml} (54%) rename app/src/main/res/drawable/{ic_format_align_center_grey_36dp.xml => ic_format_align_center_grey.xml} (54%) rename app/src/main/res/drawable/{ic_format_align_left_grey_36dp.xml => ic_format_align_left_grey.xml} (54%) rename app/src/main/res/drawable/{ic_format_align_right_grey_36dp.xml => ic_format_align_right_grey.xml} (54%) rename app/src/main/res/drawable/{ic_format_bold_grey_36dp.xml => ic_format_bold_grey.xml} (81%) rename app/src/main/res/drawable/{ic_format_color_text_36dp.xml => ic_format_color_text.xml} (65%) create mode 100644 app/src/main/res/drawable/ic_format_italic_grey.xml delete mode 100644 app/src/main/res/drawable/ic_format_italic_grey_36dp.xml rename app/src/main/res/drawable/{ic_format_list_bulleted_black_36dp.xml => ic_format_list_bulleted_black.xml} (70%) create mode 100644 app/src/main/res/drawable/ic_format_quote_grey.xml create mode 100644 app/src/main/res/drawable/ic_format_size_black.xml delete mode 100644 app/src/main/res/drawable/ic_format_size_black_36dp.xml rename app/src/main/res/drawable/{ic_format_underlined_grey_36dp.xml => ic_format_underlined_grey.xml} (57%) create mode 100644 app/src/main/res/drawable/ic_functions_black.xml delete mode 100644 app/src/main/res/drawable/ic_functions_black_36dp.xml rename app/src/main/res/drawable/{ic_insert_link_gre_36dp.xml => ic_insert_link_grey.xml} (66%) rename app/src/main/res/drawable/{ic_strikethrough_s_grey_36dp.xml => ic_strikethrough_s_grey.xml} (88%) rename app/src/main/res/drawable/{ic_text_format_grey_36dp.xml => ic_text_format_grey.xml} (55%) diff --git a/app/src/main/res/drawable/ic_code_grey_36dp.xml b/app/src/main/res/drawable/ic_code_grey.xml similarity index 54% rename from app/src/main/res/drawable/ic_code_grey_36dp.xml rename to app/src/main/res/drawable/ic_code_grey.xml index 382786f1..e88ec8d4 100644 --- a/app/src/main/res/drawable/ic_code_grey_36dp.xml +++ b/app/src/main/res/drawable/ic_code_grey.xml @@ -1,5 +1,5 @@ - + android:width="@dimen/editor_format_button_size" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/app/src/main/res/drawable/ic_format_align_center_grey_36dp.xml b/app/src/main/res/drawable/ic_format_align_center_grey.xml similarity index 54% rename from app/src/main/res/drawable/ic_format_align_center_grey_36dp.xml rename to app/src/main/res/drawable/ic_format_align_center_grey.xml index 001540aa..bb2ac52f 100644 --- a/app/src/main/res/drawable/ic_format_align_center_grey_36dp.xml +++ b/app/src/main/res/drawable/ic_format_align_center_grey.xml @@ -1,5 +1,5 @@ - + android:width="@dimen/editor_format_button_size" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/app/src/main/res/drawable/ic_format_align_left_grey_36dp.xml b/app/src/main/res/drawable/ic_format_align_left_grey.xml similarity index 54% rename from app/src/main/res/drawable/ic_format_align_left_grey_36dp.xml rename to app/src/main/res/drawable/ic_format_align_left_grey.xml index c0688aef..1eb7f3da 100644 --- a/app/src/main/res/drawable/ic_format_align_left_grey_36dp.xml +++ b/app/src/main/res/drawable/ic_format_align_left_grey.xml @@ -1,5 +1,5 @@ - + android:width="@dimen/editor_format_button_size" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/app/src/main/res/drawable/ic_format_align_right_grey_36dp.xml b/app/src/main/res/drawable/ic_format_align_right_grey.xml similarity index 54% rename from app/src/main/res/drawable/ic_format_align_right_grey_36dp.xml rename to app/src/main/res/drawable/ic_format_align_right_grey.xml index f486de4a..e6545636 100644 --- a/app/src/main/res/drawable/ic_format_align_right_grey_36dp.xml +++ b/app/src/main/res/drawable/ic_format_align_right_grey.xml @@ -1,5 +1,5 @@ - + android:width="@dimen/editor_format_button_size" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/app/src/main/res/drawable/ic_format_bold_grey_36dp.xml b/app/src/main/res/drawable/ic_format_bold_grey.xml similarity index 81% rename from app/src/main/res/drawable/ic_format_bold_grey_36dp.xml rename to app/src/main/res/drawable/ic_format_bold_grey.xml index 2a0ef3cf..a4681ef2 100644 --- a/app/src/main/res/drawable/ic_format_bold_grey_36dp.xml +++ b/app/src/main/res/drawable/ic_format_bold_grey.xml @@ -1,6 +1,6 @@ + android:width="@dimen/editor_format_button_size" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/app/src/main/res/drawable/ic_format_italic_grey.xml b/app/src/main/res/drawable/ic_format_italic_grey.xml new file mode 100644 index 00000000..ee452438 --- /dev/null +++ b/app/src/main/res/drawable/ic_format_italic_grey.xml @@ -0,0 +1,4 @@ + + + diff --git a/app/src/main/res/drawable/ic_format_italic_grey_36dp.xml b/app/src/main/res/drawable/ic_format_italic_grey_36dp.xml deleted file mode 100644 index 31ae9249..00000000 --- a/app/src/main/res/drawable/ic_format_italic_grey_36dp.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_format_list_bulleted_black_36dp.xml b/app/src/main/res/drawable/ic_format_list_bulleted_black.xml similarity index 70% rename from app/src/main/res/drawable/ic_format_list_bulleted_black_36dp.xml rename to app/src/main/res/drawable/ic_format_list_bulleted_black.xml index 228e7a79..774e618c 100644 --- a/app/src/main/res/drawable/ic_format_list_bulleted_black_36dp.xml +++ b/app/src/main/res/drawable/ic_format_list_bulleted_black.xml @@ -1,5 +1,5 @@ - + android:width="@dimen/editor_format_button_size" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/app/src/main/res/drawable/ic_format_quote_grey.xml b/app/src/main/res/drawable/ic_format_quote_grey.xml new file mode 100644 index 00000000..dc0ebe5b --- /dev/null +++ b/app/src/main/res/drawable/ic_format_quote_grey.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_format_size_black.xml b/app/src/main/res/drawable/ic_format_size_black.xml new file mode 100644 index 00000000..400ad0a7 --- /dev/null +++ b/app/src/main/res/drawable/ic_format_size_black.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_format_size_black_36dp.xml b/app/src/main/res/drawable/ic_format_size_black_36dp.xml deleted file mode 100644 index 54e5a142..00000000 --- a/app/src/main/res/drawable/ic_format_size_black_36dp.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_format_underlined_grey_36dp.xml b/app/src/main/res/drawable/ic_format_underlined_grey.xml similarity index 57% rename from app/src/main/res/drawable/ic_format_underlined_grey_36dp.xml rename to app/src/main/res/drawable/ic_format_underlined_grey.xml index 68fa161a..1fc2bf7f 100644 --- a/app/src/main/res/drawable/ic_format_underlined_grey_36dp.xml +++ b/app/src/main/res/drawable/ic_format_underlined_grey.xml @@ -1,5 +1,5 @@ - + android:width="@dimen/editor_format_button_size" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/app/src/main/res/drawable/ic_functions_black.xml b/app/src/main/res/drawable/ic_functions_black.xml new file mode 100644 index 00000000..305b9658 --- /dev/null +++ b/app/src/main/res/drawable/ic_functions_black.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_functions_black_36dp.xml b/app/src/main/res/drawable/ic_functions_black_36dp.xml deleted file mode 100644 index 5c2bf617..00000000 --- a/app/src/main/res/drawable/ic_functions_black_36dp.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_insert_link_gre_36dp.xml b/app/src/main/res/drawable/ic_insert_link_grey.xml similarity index 66% rename from app/src/main/res/drawable/ic_insert_link_gre_36dp.xml rename to app/src/main/res/drawable/ic_insert_link_grey.xml index ca131ec9..1f0b5787 100644 --- a/app/src/main/res/drawable/ic_insert_link_gre_36dp.xml +++ b/app/src/main/res/drawable/ic_insert_link_grey.xml @@ -1,5 +1,5 @@ - + android:width="@dimen/editor_format_button_size" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/app/src/main/res/drawable/ic_strikethrough_s_grey_36dp.xml b/app/src/main/res/drawable/ic_strikethrough_s_grey.xml similarity index 88% rename from app/src/main/res/drawable/ic_strikethrough_s_grey_36dp.xml rename to app/src/main/res/drawable/ic_strikethrough_s_grey.xml index 9ee72210..f1712056 100644 --- a/app/src/main/res/drawable/ic_strikethrough_s_grey_36dp.xml +++ b/app/src/main/res/drawable/ic_strikethrough_s_grey.xml @@ -1,5 +1,5 @@ - + android:width="@dimen/editor_format_button_size" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/app/src/main/res/drawable/ic_text_format_grey_36dp.xml b/app/src/main/res/drawable/ic_text_format_grey.xml similarity index 55% rename from app/src/main/res/drawable/ic_text_format_grey_36dp.xml rename to app/src/main/res/drawable/ic_text_format_grey.xml index 83b2e497..382416ad 100644 --- a/app/src/main/res/drawable/ic_text_format_grey_36dp.xml +++ b/app/src/main/res/drawable/ic_text_format_grey.xml @@ -1,5 +1,5 @@ - + android:width="@dimen/editor_format_button_size" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/app/src/main/res/layout/activity_topic_quick_reply_row.xml b/app/src/main/res/layout/activity_topic_quick_reply_row.xml index eb8569c5..84ff1b6a 100644 --- a/app/src/main/res/layout/activity_topic_quick_reply_row.xml +++ b/app/src/main/res/layout/activity_topic_quick_reply_row.xml @@ -84,6 +84,8 @@ android:id="@+id/reply_editorview" android:layout_width="match_parent" android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp" android:background="@color/card_background" card_view:hint="Post message" /> diff --git a/app/src/main/res/layout/editor_view.xml b/app/src/main/res/layout/editor_view.xml index 0c36c0cd..a51ee8e1 100644 --- a/app/src/main/res/layout/editor_view.xml +++ b/app/src/main/res/layout/editor_view.xml @@ -8,96 +8,109 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" - app:columnWidth="36dp"> + app:columnWidth="28dp"> @@ -105,23 +118,23 @@ android:id="@+id/code_button" android:layout_width="wrap_content" android:layout_height="wrap_content" - app:srcCompat="@drawable/ic_code_grey_36dp" + android:layout_marginEnd="@dimen/editor_format_button_margin_between" + app:srcCompat="@drawable/ic_code_grey" android:background="?android:selectableItemBackground"/> + android:orientation="horizontal"> 16dp 10dp 24sp + 24dp + 4dp