diff --git a/app/build.gradle b/app/build.gradle index c671cfd0..4dee7878 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -27,8 +27,8 @@ android { applicationId "com.fastaccess.github" minSdkVersion 21 targetSdkVersion 25 - versionCode 130 - versionName "1.3.0" + versionCode 131 + versionName "1.3.1" signingConfig signingConfigs.signing buildConfigString "GITHUB_CLIENT_ID", (buildProperties.secrets['github_client_id'] | buildProperties.notThere['github_client_id']).string buildConfigString "GITHUB_SECRET", (buildProperties.secrets['github_secret'] | buildProperties.notThere['github_secret']).string diff --git a/app/src/main/java/com/fastaccess/helper/AppHelper.java b/app/src/main/java/com/fastaccess/helper/AppHelper.java index 27658b9b..71a1a9e8 100644 --- a/app/src/main/java/com/fastaccess/helper/AppHelper.java +++ b/app/src/main/java/com/fastaccess/helper/AppHelper.java @@ -46,6 +46,6 @@ public class AppHelper { public static boolean isNightMode(@NonNull Resources resources) { int currentNightMode = resources.getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; - return currentNightMode == Configuration.UI_MODE_NIGHT_YES; + return currentNightMode == Configuration.UI_MODE_NIGHT_YES || PrefGetter.getThemeType(resources) == PrefGetter.DARK; } } diff --git a/app/src/main/java/com/fastaccess/helper/PrefGetter.java b/app/src/main/java/com/fastaccess/helper/PrefGetter.java index 5e724945..e66686e0 100644 --- a/app/src/main/java/com/fastaccess/helper/PrefGetter.java +++ b/app/src/main/java/com/fastaccess/helper/PrefGetter.java @@ -1,6 +1,7 @@ package com.fastaccess.helper; import android.content.Context; +import android.content.res.Resources; import android.support.annotation.IntDef; import android.support.annotation.NonNull; @@ -129,13 +130,17 @@ public class PrefGetter { } @ThemeType public static int getThemeType(@NonNull Context context) { + return getThemeType(context.getResources()); + } + + @ThemeType public static int getThemeType(@NonNull Resources resources) { String appTheme = PrefHelper.getString("appTheme"); if (!InputHelper.isEmpty(appTheme)) { - if (appTheme.equalsIgnoreCase(context.getString(R.string.auto_theme_mode))) { + if (appTheme.equalsIgnoreCase(resources.getString(R.string.auto_theme_mode))) { return AUTO; - } else if (appTheme.equalsIgnoreCase(context.getString(R.string.dark_theme_mode))) { + } else if (appTheme.equalsIgnoreCase(resources.getString(R.string.dark_theme_mode))) { return DARK; - } else if (appTheme.equalsIgnoreCase(context.getString(R.string.light_theme_mode))) { + } else if (appTheme.equalsIgnoreCase(resources.getString(R.string.light_theme_mode))) { return LIGHT; } /* add future themes here */ } diff --git a/app/src/main/java/com/prettifier/pretty/helper/PrettifyHelper.java b/app/src/main/java/com/prettifier/pretty/helper/PrettifyHelper.java index 36f0fb8a..08c0765a 100755 --- a/app/src/main/java/com/prettifier/pretty/helper/PrettifyHelper.java +++ b/app/src/main/java/com/prettifier/pretty/helper/PrettifyHelper.java @@ -31,7 +31,7 @@ public class PrettifyHelper { } @NonNull private static String getStyle(boolean isDark) { - return !isDark ? "prettify.css" : "prettify_darkG.css"; + return !isDark ? "prettify.css" : "prettify_dark.css"; } } diff --git a/app/src/main/res/layouts/row_layouts/layout/releases_row_item.xml b/app/src/main/res/layouts/row_layouts/layout/releases_row_item.xml index f121ccc1..eaf1f413 100644 --- a/app/src/main/res/layouts/row_layouts/layout/releases_row_item.xml +++ b/app/src/main/res/layouts/row_layouts/layout/releases_row_item.xml @@ -31,44 +31,46 @@ + android:orientation="horizontal"> - + android:layout_weight="1" + android:orientation="vertical"> + + + - - + + diff --git a/app/src/main/res/values-night/styles.xml b/app/src/main/res/values-night/styles.xml index 9ae9cfdb..2530c341 100644 --- a/app/src/main/res/values-night/styles.xml +++ b/app/src/main/res/values-night/styles.xml @@ -1,71 +1,4 @@ - - - - - - - - - + - - - - + + + + + + + + + + \ 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 cb6200d6..ec78d0a0 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -4,70 +4,6 @@ - - - - - - - - - - - - - diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml new file mode 100644 index 00000000..d155fa0c --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file