From 1b1c00d6033079f114e3e5f5e6276b8a02cdf64c Mon Sep 17 00:00:00 2001 From: RichyHBM Date: Sat, 25 Nov 2017 13:30:49 +0000 Subject: [PATCH] Show default thumbnail --- .../shadowice/flocke/andotp/Activities/MainActivity.java | 3 ++- .../org/shadowice/flocke/andotp/Utilities/Settings.java | 5 +++++ app/src/main/res/layout/component_card.xml | 7 +++++++ app/src/main/res/values/dimens.xml | 4 ++++ app/src/main/res/values/settings.xml | 1 + app/src/main/res/values/strings_settings.xml | 1 + app/src/main/res/xml/preferences.xml | 6 ++++++ 7 files changed, 26 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/shadowice/flocke/andotp/Activities/MainActivity.java b/app/src/main/java/org/shadowice/flocke/andotp/Activities/MainActivity.java index 30a84126..60f158b4 100644 --- a/app/src/main/java/org/shadowice/flocke/andotp/Activities/MainActivity.java +++ b/app/src/main/java/org/shadowice/flocke/andotp/Activities/MainActivity.java @@ -429,7 +429,8 @@ public class MainActivity extends BaseActivity public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { if (key.equals(getString(R.string.settings_key_label_size)) || key.equals(getString(R.string.settings_key_tap_to_reveal)) || - key.equals(getString(R.string.settings_key_label_scroll))) { + key.equals(getString(R.string.settings_key_label_scroll)) || + key.equals(getString(R.string.settings_key_thumbnail_visible))) { adapter.notifyDataSetChanged(); } else if (key.equals(getString(R.string.settings_key_theme)) || key.equals(getString(R.string.settings_key_lang))) { diff --git a/app/src/main/java/org/shadowice/flocke/andotp/Utilities/Settings.java b/app/src/main/java/org/shadowice/flocke/andotp/Utilities/Settings.java index 77e3d4bf..0b90f4ab 100644 --- a/app/src/main/java/org/shadowice/flocke/andotp/Utilities/Settings.java +++ b/app/src/main/java/org/shadowice/flocke/andotp/Utilities/Settings.java @@ -330,4 +330,9 @@ public class Settings { toggledTags.add(tag); setStringSet(R.string.settings_key_tags_toggles, toggledTags); } + + public boolean getThumbnailVisible() { + return getBoolean(R.string.settings_key_thumbnail_visible, true); + } + } diff --git a/app/src/main/res/layout/component_card.xml b/app/src/main/res/layout/component_card.xml index 5ef14874..ee9891dc 100644 --- a/app/src/main/res/layout/component_card.xml +++ b/app/src/main/res/layout/component_card.xml @@ -13,6 +13,13 @@ android:gravity="center_vertical" android:baselineAligned="false" > + + 16dp 0dp + 64dp + + + 33sp 200dp 1dp diff --git a/app/src/main/res/values/settings.xml b/app/src/main/res/values/settings.xml index da712e4b..97dc00fa 100644 --- a/app/src/main/res/values/settings.xml +++ b/app/src/main/res/values/settings.xml @@ -15,6 +15,7 @@ pref_theme pref_label_size pref_label_scroll + pref_thumbnail_visible pref_backup_ask pref_backup_directory diff --git a/app/src/main/res/values/strings_settings.xml b/app/src/main/res/values/strings_settings.xml index aebf17e4..7ab3a1bf 100644 --- a/app/src/main/res/values/strings_settings.xml +++ b/app/src/main/res/values/strings_settings.xml @@ -18,6 +18,7 @@ Theme Label font size Scroll label + Show thumbnails Ask for filename Backup directory diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 8c32e7ea..6530b829 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -66,6 +66,12 @@ android:summary="@string/settings_desc_label_scroll" android:defaultValue="false" /> + + +