diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-29 23:24:05 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-29 23:24:05 +0200 |
commit | 9a22917951a9dacc9470633f94b769c4d7187943 (patch) | |
tree | b4c484158caf88273a9ebecc81074bced0fd675c /src/main/java/de/pixart/messenger/utils | |
parent | f149772daffab5351aec06c5e62ebb9e9d54dc64 (diff) |
migrate recording activity to view binder
Diffstat (limited to 'src/main/java/de/pixart/messenger/utils')
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/ThemeHelper.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/ThemeHelper.java b/src/main/java/de/pixart/messenger/utils/ThemeHelper.java index 3568a488a..27a48f069 100644 --- a/src/main/java/de/pixart/messenger/utils/ThemeHelper.java +++ b/src/main/java/de/pixart/messenger/utils/ThemeHelper.java @@ -59,6 +59,21 @@ public class ThemeHelper { } } + public static int findDialog(Context context) { + final SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); + final Resources resources = context.getResources(); + final boolean dark = sharedPreferences.getString(SettingsActivity.THEME, resources.getString(R.string.theme)).equals("dark"); + final String fontSize = sharedPreferences.getString("font_size", resources.getString(R.string.default_font_size)); + switch (fontSize) { + case "medium": + return dark ? R.style.ConversationsTheme_Dark_Dialog_Medium : R.style.ConversationsTheme_Dialog_Medium; + case "large": + return dark ? R.style.ConversationsTheme_Dark_Dialog_Large : R.style.ConversationsTheme_Dialog_Large; + default: + return dark ? R.style.ConversationsTheme_Dark_Dialog: R.style.ConversationsTheme_Dialog; + } + } + public static boolean isDark(@StyleRes int id) { switch (id) { case R.style.ConversationsTheme_Dark: |