diff --git a/xwords4/android/XWords4/res/values/common_rsrc.xml b/xwords4/android/XWords4/res/values/common_rsrc.xml index eb45a31af..39b7847fa 100644 --- a/xwords4/android/XWords4/res/values/common_rsrc.xml +++ b/xwords4/android/XWords4/res/values/common_rsrc.xml @@ -58,6 +58,9 @@ key_enable_sms key_keep_screenon key_thumbsize2 + key_thumb_disabled + key_thumb_useactive + key_summary_field key_default_loc @@ -136,7 +139,6 @@ Write DB to SD card Load DB from SD card - Off 1/3 1/4 1/5 @@ -289,7 +291,6 @@ - @string/game_thumb_off @string/game_thumb_third @string/game_thumb_quarter @string/game_thumb_fifth diff --git a/xwords4/android/XWords4/res/values/strings.xml b/xwords4/android/XWords4/res/values/strings.xml index 50665d4a2..0c738c21f 100644 --- a/xwords4/android/XWords4/res/values/strings.xml +++ b/xwords4/android/XWords4/res/values/strings.xml @@ -1853,7 +1853,7 @@ (If relevant, please include the version: \"%s\"; and make/model of your phone or - tablet.)" + tablet.) Turn Bluetooth on @@ -2154,8 +2154,17 @@ now clears any selection instead of exiting. Hit it again to exit the app. - Games: %d" - Groups: %d" + Games: %d + Groups: %d Thumbnail size - Wordlists: %d" + Wordlists: %d + + Thumb disabled + Summayr thumb disbled + thumb_useactive + summary_thumb_useactive + + Thumbnail prefs + prefs_thumb_summary + diff --git a/xwords4/android/XWords4/res/xml/xwprefs.xml b/xwords4/android/XWords4/res/xml/xwprefs.xml index e2a2ca483..3e2c3affe 100644 --- a/xwords4/android/XWords4/res/xml/xwprefs.xml +++ b/xwords4/android/XWords4/res/xml/xwprefs.xml @@ -138,13 +138,29 @@ android:defaultValue="false" /> - + + + + + + + = 0 ); db.close(); + + notifyListeners( rowid, false ); } } } diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java index a94394242..8233c4435 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java @@ -188,7 +188,9 @@ public class GameListItem extends LinearLayout R.drawable.expander_ic_minimized); m_hideable.setVisibility( m_expanded? View.VISIBLE : View.GONE ); if ( GitVersion.THUMBNAIL_SUPPORTED ) { - m_thumb.setVisibility( m_expanded ? View.VISIBLE : View.GONE ); + int vis = m_expanded && XWPrefs.getThumbEnabled( m_context ) + ? View.VISIBLE : View.GONE; + m_thumb.setVisibility( vis ); } m_name.setBackgroundColor( android.R.color.transparent ); @@ -299,12 +301,7 @@ public class GameListItem extends LinearLayout if ( GitVersion.THUMBNAIL_SUPPORTED ) { m_thumb = (ImageView)findViewById( R.id.thumbnail ); - Bitmap bmp = summary.getThumbnail(); - if ( null == bmp ) { - m_thumb.setVisibility( View.GONE ); - } else { - m_thumb.setImageBitmap( bmp ); - } + m_thumb.setImageBitmap( summary.getThumbnail() ); } tview = (TextView)findViewById( R.id.role ); diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWPrefs.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWPrefs.java index ac2e48a51..05b3bf62d 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWPrefs.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/XWPrefs.java @@ -328,13 +328,16 @@ public class XWPrefs { return posns; } + public static boolean getThumbEnabled( Context context ) + { + return !getPrefsBoolean( context, R.string.key_thumb_disabled, false ); + } + public static int getThumbScale( Context context ) { String scale = getPrefsString( context, R.string.key_thumbsize ); int result = -1; - if ( context.getString(R.string.game_thumb_off).equals(scale) ) { - result = 0; - } else if ( context.getString(R.string.game_thumb_third).equals(scale) ) { + if ( context.getString(R.string.game_thumb_third).equals(scale) ) { result = 3; } else if ( context.getString(R.string.game_thumb_quarter).equals(scale) ) { result = 4;