hide games-list hint when more than 2 games present, and add text to

that effect so people aren't surprised.
This commit is contained in:
Andy2 2011-03-10 18:24:27 -08:00
parent d9bb5197d4
commit d56ce42585
3 changed files with 5 additions and 2 deletions

View file

@ -12,6 +12,8 @@
android:layout_width="wrap_content"
android:text="@string/empty_games_list"
android:textAppearance="?android:attr/textAppearanceMedium"
android:background="#FF202020"
android:gravity="center"
/>
<ListView android:id="@id/android:list"

View file

@ -532,6 +532,7 @@
<string name="empty_games_list">Use one of the buttons below to
create a game. Then tap the game to play or long-tap it for
other options.</string>
other options.\n(This hint will disappear whenever there are
more than two games in the list.)</string>
</resources>

View file

@ -247,7 +247,7 @@ public class GamesList extends XWListActivity
public void onContentChanged()
{
int count = DBUtils.gamesList( this ).length;
int hereOrGone = count > 3 ? View.GONE : View.VISIBLE;
int hereOrGone = count > 2 ? View.GONE : View.VISIBLE;
View hint = findViewById( R.id.empty_games_list );
hint.setVisibility( hereOrGone );