From 15eed4137ab96a840f5f9a2e0960df37865d89e6 Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Mon, 14 Sep 2020 23:17:35 +0900 Subject: [PATCH] Fix previous themes and add Material Dark theme (needs improvements) --- .../activities/BaseLanguageActivity.java | 2 +- .../instagrabber/activities/MainActivity.java | 1 - app/src/main/res/layout/activity_main.xml | 1 - app/src/main/res/values/arrays.xml | 2 + app/src/main/res/values/color.xml | 24 ++++- app/src/main/res/values/strings.xml | 1 + app/src/main/res/values/styles.xml | 36 +++++-- app/src/main/res/values/themes.xml | 99 ++++++++++++++----- 8 files changed, 127 insertions(+), 39 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/activities/BaseLanguageActivity.java b/app/src/main/java/awais/instagrabber/activities/BaseLanguageActivity.java index 69b00010..aeaad606 100755 --- a/app/src/main/java/awais/instagrabber/activities/BaseLanguageActivity.java +++ b/app/src/main/java/awais/instagrabber/activities/BaseLanguageActivity.java @@ -15,7 +15,7 @@ public abstract class BaseLanguageActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable final Bundle savedInstanceState) { - super.onCreate(savedInstanceState); ThemeUtils.changeTheme(this); + super.onCreate(savedInstanceState); } } diff --git a/app/src/main/java/awais/instagrabber/activities/MainActivity.java b/app/src/main/java/awais/instagrabber/activities/MainActivity.java index a63c6980..7f9338b8 100644 --- a/app/src/main/java/awais/instagrabber/activities/MainActivity.java +++ b/app/src/main/java/awais/instagrabber/activities/MainActivity.java @@ -264,7 +264,6 @@ public class MainActivity extends BaseLanguageActivity { final View searchText = searchView.findViewById(R.id.search_src_text); if (searchText instanceof AutoCompleteTextView) { searchAutoComplete = (AutoCompleteTextView) searchText; - searchAutoComplete.setTextColor(getResources().getColor(android.R.color.white)); } searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { private boolean searchUser; diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index d1fc054f..47477544 100755 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -25,7 +25,6 @@ @string/dark_black_theme + @string/dark_material_dark_theme @style/AppTheme.Dark.Black + @style/AppTheme.Dark.MaterialDark diff --git a/app/src/main/res/values/color.xml b/app/src/main/res/values/color.xml index 8eeecd13..1c18c8a9 100755 --- a/app/src/main/res/values/color.xml +++ b/app/src/main/res/values/color.xml @@ -34,7 +34,9 @@ #80000000 #FFFFFF + #000000 + #121212 #FAFAFA #F5F5F5 @@ -63,7 +65,25 @@ #2979FF #2962FF + #EFEBE9 + #D7CCC8 + #BCAAA4 + #A1887F + #8D6E63 + #795548 + #6D4C41 + #5D4037 + #4E342E + #3E2723 + + #03dac6 #66BB6A + #018786 + + #bb86fc + #4b01d0 + + #cf6679 #a86735 @@ -72,6 +92,6 @@ #d4ab7c #ffddac #a17c4f - #616161 - @color/black + #616161 + @color/white \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d7c7f254..755cd4bb 100755 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -282,4 +282,5 @@ Light theme Dark theme Barinsta + Material Dark \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 5cb01aac..459a3d33 100755 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -23,12 +23,12 @@ false - + + + + - - - @@ -85,11 +85,27 @@ @color/grey_800 - + + + + + + diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 8026a619..dad9accf 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -1,37 +1,87 @@ - + - - - + + + + + + - - -