when inviting show means, not knowns, by default

If you've bypassed the quick-start game it's probably because you want
to play somebody not yet in the Known Players list. So don't start out
with that list as how you'll invite.
This commit is contained in:
Eric House 2020-09-26 20:40:19 -07:00
parent af3eee42df
commit 810030125b
2 changed files with 10 additions and 10 deletions

View file

@ -60,12 +60,12 @@ public class InviteView extends ScrollView
{
Context context = getContext();
boolean showWho = null != players && 0 < players.length;
boolean haveWho = null != players && 0 < players.length;
// top/horizontal group or title first
if ( showWho ) {
if ( haveWho ) {
mGroupTab = (RadioGroup)findViewById( R.id.group_tab );
mGroupTab.check( R.id.radio_who );
mGroupTab.check( R.id.radio_how );
mGroupTab.setOnCheckedChangeListener( this );
mGroupTab.setVisibility( View.VISIBLE );
} else {
@ -82,7 +82,7 @@ public class InviteView extends ScrollView
mHowMeans.put( button, means );
}
if ( showWho ) {
if ( haveWho ) {
mGroupWho = (RadioGroup)findViewById( R.id.group_who );
mGroupWho.setOnCheckedChangeListener( this );
for ( String player : players ) {
@ -92,7 +92,7 @@ public class InviteView extends ScrollView
mWhoPlayers.put( button, player );
}
}
mIsWho = showWho;
mIsWho = false; // start with how
showWhoOrHow();
return this;

View file

@ -29,16 +29,16 @@
android:layout_gravity="center_horizontal"
android:visibility="gone"
>
<RadioButton android:id="@+id/radio_who"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/radio_who"
/>
<RadioButton android:id="@+id/radio_how"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/radio_how"
/>
<RadioButton android:id="@+id/radio_who"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/radio_who"
/>
</RadioGroup>
<FrameLayout android:layout_width="match_parent"