Show default thumbnail
This commit is contained in:
parent
d07db0b07f
commit
1b1c00d603
7 changed files with 26 additions and 1 deletions
|
@ -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))) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,6 +13,13 @@
|
|||
android:gravity="center_vertical"
|
||||
android:baselineAligned="false" >
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/thumbnailImg"
|
||||
android:layout_width="@dimen/card_thumbnail_size"
|
||||
android:layout_height="@dimen/card_thumbnail_size"
|
||||
android:layout_marginEnd="@dimen/activity_margin_small"
|
||||
android:src="@mipmap/ic_launcher"/>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="0dip"
|
||||
|
|
|
@ -9,6 +9,10 @@
|
|||
<dimen name="activity_horizontal_margin">16dp</dimen>
|
||||
|
||||
<dimen name="card_corner_radius">0dp</dimen>
|
||||
<dimen name="card_thumbnail_size">64dp</dimen>
|
||||
|
||||
<!-- The default letter tile text size -->
|
||||
<dimen name="tile_letter_font_size">33sp</dimen>
|
||||
|
||||
<dimen name="drawer_width">200dp</dimen>
|
||||
<dimen name="divider_size">1dp</dimen>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<string name="settings_key_theme" translatable="false">pref_theme</string>
|
||||
<string name="settings_key_label_size" translatable="false">pref_label_size</string>
|
||||
<string name="settings_key_label_scroll" translatable="false">pref_label_scroll</string>
|
||||
<string name="settings_key_thumbnail_visible" translatable="false">pref_thumbnail_visible</string>
|
||||
|
||||
<string name="settings_key_backup_ask" translatable="false">pref_backup_ask</string>
|
||||
<string name="settings_key_backup_directory" translatable="false">pref_backup_directory</string>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<string name="settings_title_theme">Theme</string>
|
||||
<string name="settings_title_label_size">Label font size</string>
|
||||
<string name="settings_title_label_scroll">Scroll label</string>
|
||||
<string name="settings_title_thumbnail_visible_ask">Show thumbnails</string>
|
||||
|
||||
<string name="settings_title_backup_ask">Ask for filename</string>
|
||||
<string name="settings_title_backup_directory">Backup directory</string>
|
||||
|
|
|
@ -66,6 +66,12 @@
|
|||
android:summary="@string/settings_desc_label_scroll"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="@string/settings_key_thumbnail_visible"
|
||||
android:title="@string/settings_title_thumbnail_visible_ask"
|
||||
android:defaultValue="true" />
|
||||
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
|
|
Loading…
Reference in a new issue