mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
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.
This commit is contained in:
parent
c2305dafff
commit
3140df2f37
2 changed files with 9 additions and 7 deletions
|
@ -13,13 +13,14 @@
|
|||
android:background="@android:drawable/list_selector_background"
|
||||
>
|
||||
|
||||
<FrameLayout android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
<TextView android:id="@+id/view_unloaded"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:gravity="center"
|
||||
android:paddingTop="10dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="@string/game_list_tmp"
|
||||
/>
|
||||
|
||||
|
@ -118,5 +119,6 @@
|
|||
/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</org.eehouse.android.xw4.GameListItem>
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue