From f8cf474ee4798cd83358e2b455d96030a154f9d2 Mon Sep 17 00:00:00 2001 From: Thodoris1999 Date: Sat, 1 Sep 2018 20:07:01 +0300 Subject: [PATCH] parametrize topic post/edit/reply icon colors --- .../mthmmy/activities/topic/TopicAdapter.java | 4 +-- .../thmmy/mthmmy/editorview/EditorView.java | 8 ++--- .../{ic_code_grey.xml => ic_code.xml} | 2 +- ...er_grey.xml => ic_format_align_center.xml} | 2 +- ...left_grey.xml => ic_format_align_left.xml} | 2 +- ...ght_grey.xml => ic_format_align_right.xml} | 2 +- ...ormat_bold_grey.xml => ic_format_bold.xml} | 2 +- .../res/drawable/ic_format_color_text.xml | 2 +- ...t_italic_grey.xml => ic_format_italic.xml} | 2 +- ..._black.xml => ic_format_list_bulleted.xml} | 2 +- ...mat_quote_grey.xml => ic_format_quote.xml} | 2 +- ...xml => ic_format_quote_unchecked_24dp.xml} | 2 +- ...rmat_size_black.xml => ic_format_size.xml} | 2 +- ...ined_grey.xml => ic_format_underlined.xml} | 2 +- ...c_functions_black.xml => ic_functions.xml} | 2 +- ...nsert_link_grey.xml => ic_insert_link.xml} | 2 +- ...ard_grey_24dp.xml => ic_keyboard_24dp.xml} | 2 +- ...ough_s_grey.xml => ic_strikethrough_s.xml} | 2 +- ...es_grey_24dp.xml => ic_tag_faces_24dp.xml} | 2 +- ...ext_format_grey.xml => ic_text_format.xml} | 2 +- .../layout-v21/activity_topic_post_row.xml | 2 +- .../res/layout/activity_topic_post_row.xml | 2 +- app/src/main/res/layout/editor_view.xml | 30 +++++++++---------- app/src/main/res/values/colors.xml | 1 + 24 files changed, 42 insertions(+), 41 deletions(-) rename app/src/main/res/drawable/{ic_code_grey.xml => ic_code.xml} (92%) rename app/src/main/res/drawable/{ic_format_align_center_grey.xml => ic_format_align_center.xml} (92%) rename app/src/main/res/drawable/{ic_format_align_left_grey.xml => ic_format_align_left.xml} (92%) rename app/src/main/res/drawable/{ic_format_align_right_grey.xml => ic_format_align_right.xml} (92%) rename app/src/main/res/drawable/{ic_format_bold_grey.xml => ic_format_bold.xml} (91%) rename app/src/main/res/drawable/{ic_format_italic_grey.xml => ic_format_italic.xml} (65%) rename app/src/main/res/drawable/{ic_format_list_bulleted_black.xml => ic_format_list_bulleted.xml} (95%) rename app/src/main/res/drawable/{ic_format_quote_grey.xml => ic_format_quote.xml} (91%) rename app/src/main/res/drawable/{ic_format_quote_unchecked_grey_24dp.xml => ic_format_quote_unchecked_24dp.xml} (80%) rename app/src/main/res/drawable/{ic_format_size_black.xml => ic_format_size.xml} (92%) rename app/src/main/res/drawable/{ic_format_underlined_grey.xml => ic_format_underlined.xml} (93%) rename app/src/main/res/drawable/{ic_functions_black.xml => ic_functions.xml} (91%) rename app/src/main/res/drawable/{ic_insert_link_grey.xml => ic_insert_link.xml} (94%) rename app/src/main/res/drawable/{ic_keyboard_grey_24dp.xml => ic_keyboard_24dp.xml} (88%) rename app/src/main/res/drawable/{ic_strikethrough_s_grey.xml => ic_strikethrough_s.xml} (98%) rename app/src/main/res/drawable/{ic_tag_faces_grey_24dp.xml => ic_tag_faces_24dp.xml} (89%) rename app/src/main/res/drawable/{ic_text_format_grey.xml => ic_text_format.xml} (92%) diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java index 2efb86c7..1359e9fa 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicAdapter.java @@ -430,14 +430,14 @@ class TopicAdapter extends RecyclerView.Adapter { if (viewModel.getToQuoteList().contains(currentPost.getPostIndex())) holder.quoteToggle.setImageResource(R.drawable.ic_format_quote_checked_accent_24dp); else - holder.quoteToggle.setImageResource(R.drawable.ic_format_quote_unchecked_grey_24dp); + holder.quoteToggle.setImageResource(R.drawable.ic_format_quote_unchecked_24dp); //Sets graphics behavior holder.quoteToggle.setOnClickListener(view -> { viewModel.postIndexToggle(currentPost.getPostIndex()); if (viewModel.getToQuoteList().contains(currentPost.getPostIndex())) holder.quoteToggle.setImageResource(R.drawable.ic_format_quote_checked_accent_24dp); else - holder.quoteToggle.setImageResource(R.drawable.ic_format_quote_unchecked_grey_24dp); + holder.quoteToggle.setImageResource(R.drawable.ic_format_quote_unchecked_24dp); }); } } else if (currentHolder instanceof QuickReplyViewHolder) { diff --git a/app/src/main/java/gr/thmmy/mthmmy/editorview/EditorView.java b/app/src/main/java/gr/thmmy/mthmmy/editorview/EditorView.java index b5a0a12d..fdec350c 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/editorview/EditorView.java +++ b/app/src/main/java/gr/thmmy/mthmmy/editorview/EditorView.java @@ -83,11 +83,11 @@ public class EditorView extends LinearLayout { if (emojiKeyboardOwner.isEmojiKeyboardVisible()) { editText.requestFocus(); imm.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT); - emojiButton.setImageResource(R.drawable.ic_tag_faces_grey_24dp); + emojiButton.setImageResource(R.drawable.ic_tag_faces_24dp); } else { imm.hideSoftInputFromWindow(getWindowToken(), 0); view.clearFocus(); - emojiButton.setImageResource(R.drawable.ic_keyboard_grey_24dp); + emojiButton.setImageResource(R.drawable.ic_keyboard_24dp); } emojiKeyboardOwner.setEmojiKeyboardVisible(!emojiKeyboardOwner.isEmojiKeyboardVisible()); }); @@ -276,8 +276,8 @@ public class EditorView extends LinearLayout { public void updateEmojiKeyboardVisibility() { if (emojiKeyboardOwner.isEmojiKeyboardVisible()) - emojiButton.setImageResource(R.drawable.ic_keyboard_grey_24dp); + emojiButton.setImageResource(R.drawable.ic_keyboard_24dp); else - emojiButton.setImageResource(R.drawable.ic_tag_faces_grey_24dp); + emojiButton.setImageResource(R.drawable.ic_tag_faces_24dp); } } diff --git a/app/src/main/res/drawable/ic_code_grey.xml b/app/src/main/res/drawable/ic_code.xml similarity index 92% rename from app/src/main/res/drawable/ic_code_grey.xml rename to app/src/main/res/drawable/ic_code.xml index e88ec8d4..fc50feea 100644 --- a/app/src/main/res/drawable/ic_code_grey.xml +++ b/app/src/main/res/drawable/ic_code.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/drawable/ic_format_align_center_grey.xml b/app/src/main/res/drawable/ic_format_align_center.xml similarity index 92% rename from app/src/main/res/drawable/ic_format_align_center_grey.xml rename to app/src/main/res/drawable/ic_format_align_center.xml index bb2ac52f..3970a13c 100644 --- a/app/src/main/res/drawable/ic_format_align_center_grey.xml +++ b/app/src/main/res/drawable/ic_format_align_center.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/drawable/ic_format_align_left_grey.xml b/app/src/main/res/drawable/ic_format_align_left.xml similarity index 92% rename from app/src/main/res/drawable/ic_format_align_left_grey.xml rename to app/src/main/res/drawable/ic_format_align_left.xml index 1eb7f3da..27759704 100644 --- a/app/src/main/res/drawable/ic_format_align_left_grey.xml +++ b/app/src/main/res/drawable/ic_format_align_left.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/drawable/ic_format_align_right_grey.xml b/app/src/main/res/drawable/ic_format_align_right.xml similarity index 92% rename from app/src/main/res/drawable/ic_format_align_right_grey.xml rename to app/src/main/res/drawable/ic_format_align_right.xml index e6545636..94f1f326 100644 --- a/app/src/main/res/drawable/ic_format_align_right_grey.xml +++ b/app/src/main/res/drawable/ic_format_align_right.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/drawable/ic_format_bold_grey.xml b/app/src/main/res/drawable/ic_format_bold.xml similarity index 91% rename from app/src/main/res/drawable/ic_format_bold_grey.xml rename to app/src/main/res/drawable/ic_format_bold.xml index a4681ef2..612b8927 100644 --- a/app/src/main/res/drawable/ic_format_bold_grey.xml +++ b/app/src/main/res/drawable/ic_format_bold.xml @@ -4,6 +4,6 @@ android:viewportWidth="24.0" android:viewportHeight="24.0"> diff --git a/app/src/main/res/drawable/ic_format_color_text.xml b/app/src/main/res/drawable/ic_format_color_text.xml index 1a9d484b..350065ff 100644 --- a/app/src/main/res/drawable/ic_format_color_text.xml +++ b/app/src/main/res/drawable/ic_format_color_text.xml @@ -2,5 +2,5 @@ android:viewportHeight="24.0" android:viewportWidth="24.0" 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.xml similarity index 65% rename from app/src/main/res/drawable/ic_format_italic_grey.xml rename to app/src/main/res/drawable/ic_format_italic.xml index ee452438..92b9cc5a 100644 --- a/app/src/main/res/drawable/ic_format_italic_grey.xml +++ b/app/src/main/res/drawable/ic_format_italic.xml @@ -1,4 +1,4 @@ - + diff --git a/app/src/main/res/drawable/ic_format_list_bulleted_black.xml b/app/src/main/res/drawable/ic_format_list_bulleted.xml similarity index 95% rename from app/src/main/res/drawable/ic_format_list_bulleted_black.xml rename to app/src/main/res/drawable/ic_format_list_bulleted.xml index 774e618c..90969e5c 100644 --- a/app/src/main/res/drawable/ic_format_list_bulleted_black.xml +++ b/app/src/main/res/drawable/ic_format_list_bulleted.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/drawable/ic_format_quote_grey.xml b/app/src/main/res/drawable/ic_format_quote.xml similarity index 91% rename from app/src/main/res/drawable/ic_format_quote_grey.xml rename to app/src/main/res/drawable/ic_format_quote.xml index dc0ebe5b..92e96f25 100644 --- a/app/src/main/res/drawable/ic_format_quote_grey.xml +++ b/app/src/main/res/drawable/ic_format_quote.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/drawable/ic_format_quote_unchecked_grey_24dp.xml b/app/src/main/res/drawable/ic_format_quote_unchecked_24dp.xml similarity index 80% rename from app/src/main/res/drawable/ic_format_quote_unchecked_grey_24dp.xml rename to app/src/main/res/drawable/ic_format_quote_unchecked_24dp.xml index cd548072..1b05e2a7 100644 --- a/app/src/main/res/drawable/ic_format_quote_unchecked_grey_24dp.xml +++ b/app/src/main/res/drawable/ic_format_quote_unchecked_24dp.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/drawable/ic_format_size_black.xml b/app/src/main/res/drawable/ic_format_size.xml similarity index 92% rename from app/src/main/res/drawable/ic_format_size_black.xml rename to app/src/main/res/drawable/ic_format_size.xml index 400ad0a7..7b5d129a 100644 --- a/app/src/main/res/drawable/ic_format_size_black.xml +++ b/app/src/main/res/drawable/ic_format_size.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/drawable/ic_format_underlined_grey.xml b/app/src/main/res/drawable/ic_format_underlined.xml similarity index 93% rename from app/src/main/res/drawable/ic_format_underlined_grey.xml rename to app/src/main/res/drawable/ic_format_underlined.xml index 1fc2bf7f..738d6cb8 100644 --- a/app/src/main/res/drawable/ic_format_underlined_grey.xml +++ b/app/src/main/res/drawable/ic_format_underlined.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/drawable/ic_functions_black.xml b/app/src/main/res/drawable/ic_functions.xml similarity index 91% rename from app/src/main/res/drawable/ic_functions_black.xml rename to app/src/main/res/drawable/ic_functions.xml index 305b9658..834d56e1 100644 --- a/app/src/main/res/drawable/ic_functions_black.xml +++ b/app/src/main/res/drawable/ic_functions.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/drawable/ic_insert_link_grey.xml b/app/src/main/res/drawable/ic_insert_link.xml similarity index 94% rename from app/src/main/res/drawable/ic_insert_link_grey.xml rename to app/src/main/res/drawable/ic_insert_link.xml index 1f0b5787..199089f0 100644 --- a/app/src/main/res/drawable/ic_insert_link_grey.xml +++ b/app/src/main/res/drawable/ic_insert_link.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/drawable/ic_keyboard_grey_24dp.xml b/app/src/main/res/drawable/ic_keyboard_24dp.xml similarity index 88% rename from app/src/main/res/drawable/ic_keyboard_grey_24dp.xml rename to app/src/main/res/drawable/ic_keyboard_24dp.xml index 35243dc1..e050ce50 100644 --- a/app/src/main/res/drawable/ic_keyboard_grey_24dp.xml +++ b/app/src/main/res/drawable/ic_keyboard_24dp.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/drawable/ic_strikethrough_s_grey.xml b/app/src/main/res/drawable/ic_strikethrough_s.xml similarity index 98% rename from app/src/main/res/drawable/ic_strikethrough_s_grey.xml rename to app/src/main/res/drawable/ic_strikethrough_s.xml index f1712056..cb93bbc1 100644 --- a/app/src/main/res/drawable/ic_strikethrough_s_grey.xml +++ b/app/src/main/res/drawable/ic_strikethrough_s.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/drawable/ic_tag_faces_grey_24dp.xml b/app/src/main/res/drawable/ic_tag_faces_24dp.xml similarity index 89% rename from app/src/main/res/drawable/ic_tag_faces_grey_24dp.xml rename to app/src/main/res/drawable/ic_tag_faces_24dp.xml index e46eab60..8deae1ed 100644 --- a/app/src/main/res/drawable/ic_tag_faces_grey_24dp.xml +++ b/app/src/main/res/drawable/ic_tag_faces_24dp.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/drawable/ic_text_format_grey.xml b/app/src/main/res/drawable/ic_text_format.xml similarity index 92% rename from app/src/main/res/drawable/ic_text_format_grey.xml rename to app/src/main/res/drawable/ic_text_format.xml index 382416ad..529a6fdb 100644 --- a/app/src/main/res/drawable/ic_text_format_grey.xml +++ b/app/src/main/res/drawable/ic_text_format.xml @@ -1,4 +1,4 @@ - diff --git a/app/src/main/res/layout-v21/activity_topic_post_row.xml b/app/src/main/res/layout-v21/activity_topic_post_row.xml index e4363a19..ad66a8a7 100644 --- a/app/src/main/res/layout-v21/activity_topic_post_row.xml +++ b/app/src/main/res/layout-v21/activity_topic_post_row.xml @@ -95,7 +95,7 @@ android:clickable="true" android:contentDescription="@string/post_quote_button" android:focusable="true" - app:srcCompat="@drawable/ic_format_quote_unchecked_grey_24dp" /> + app:srcCompat="@drawable/ic_format_quote_unchecked_24dp" />