From 3140df2f3781f40c3fc85b987842a4f77b2ca095 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 6 Aug 2016 09:27:11 -0700 Subject: [PATCH] wrap loading and loaded views in FrameLayout This to prevent the game list item from resizing (and so reflowing the whole list) when it's reloading game info. Better would be to set a timer and only show the reloading view if it seems likely to take a minute. --- .../android/XWords4/res/layout/game_list_item.xml | 12 +++++++----- .../src/org/eehouse/android/xw4/GameListItem.java | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/xwords4/android/XWords4/res/layout/game_list_item.xml b/xwords4/android/XWords4/res/layout/game_list_item.xml index ff5de9d36..f1665fec4 100644 --- a/xwords4/android/XWords4/res/layout/game_list_item.xml +++ b/xwords4/android/XWords4/res/layout/game_list_item.xml @@ -13,13 +13,14 @@ android:background="@android:drawable/list_selector_background" > + @@ -118,5 +119,6 @@ /> - + + 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 d620be1ea..e259431a8 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/GameListItem.java @@ -204,8 +204,8 @@ public class GameListItem extends LinearLayout m_loaded = loaded; // This should be enough to invalidate - m_viewUnloaded.setVisibility( loaded ? View.GONE : View.VISIBLE ); - m_viewLoaded.setVisibility( loaded ? View.VISIBLE : View.GONE ); + m_viewUnloaded.setVisibility( loaded ? View.INVISIBLE : View.VISIBLE ); + m_viewLoaded.setVisibility( loaded ? View.VISIBLE : View.INVISIBLE ); } }