diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameListItem.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameListItem.java index b3050fcf6..3c539a9b5 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameListItem.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/GameListItem.java @@ -462,6 +462,7 @@ public class GameListItem extends LinearLayout } long m_rowid; GameListItem m_item; + int m_nTries = 0; } private static LinkedBlockingQueue s_queue = new LinkedBlockingQueue<>(); @@ -489,6 +490,11 @@ public class GameListItem extends LinearLayout ThumbQueueElem elem; try { elem = s_queue.take(); + if ( 0 < elem.m_nTries ) { + // This is a second pass. give whatever caused + // failure time to go away + Thread.sleep(200); + } } catch ( InterruptedException ie ) { Log.w( TAG, "interrupted; killing s_thumbThread" ); break; @@ -501,16 +507,22 @@ public class GameListItem extends LinearLayout thumb = GameUtils.loadMakeBitmap( activity, rowid ); } - final GameListItem item = elem.m_item; - final Bitmap ft = thumb; - activity.runOnUiThread( new Runnable() { - public void run() { - ImageView iview = item.m_thumb; - if ( null != iview ) { - iview.setImageBitmap( ft ); + if ( null == thumb ) { + if ( ++elem.m_nTries < 3 ) { + s_queue.add( elem ); + } + } else { + final GameListItem item = elem.m_item; + final Bitmap ft = thumb; + activity.runOnUiThread( new Runnable() { + public void run() { + ImageView iview = item.m_thumb; + if ( null != iview ) { + iview.setImageBitmap( ft ); + } } - } - }); + }); + } } } }); diff --git a/xwords4/android/app/src/main/res/drawable/ic_uc.xml b/xwords4/android/app/src/main/res/drawable/ic_uc.xml deleted file mode 100644 index 4738487ca..000000000 --- a/xwords4/android/app/src/main/res/drawable/ic_uc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/xwords4/android/app/src/main/res/layout/game_list_item.xml b/xwords4/android/app/src/main/res/layout/game_list_item.xml index 8d038950c..6d2d35847 100644 --- a/xwords4/android/app/src/main/res/layout/game_list_item.xml +++ b/xwords4/android/app/src/main/res/layout/game_list_item.xml @@ -66,7 +66,6 @@ -