mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-16 15:41:16 +01:00
truncate player name, not score
Try some funky layout shite to get, within a horizontal linear layout, the first text field trucated if necessary so that the second (holding the score) can be fully displayed. Tested on exactly one emulator so far.
This commit is contained in:
parent
9855ef55ae
commit
102671398b
2 changed files with 9 additions and 3 deletions
|
@ -305,7 +305,7 @@ public class GameListItem extends LinearLayout
|
|||
TextView tview = (TextView)tmp.findViewById( R.id.item_name );
|
||||
tview.setText( summary.summarizePlayer( m_context, ii ) );
|
||||
tview = (TextView)tmp.findViewById( R.id.item_score );
|
||||
tview.setText( String.format( " %d", summary.scores[ii] ) );
|
||||
tview.setText( String.format( "%d", summary.scores[ii] ) );
|
||||
boolean thisHasTurn = summary.isNextToPlay( ii, isLocal );
|
||||
if ( thisHasTurn ) {
|
||||
haveATurn = true;
|
||||
|
|
|
@ -3,19 +3,25 @@
|
|||
<org.eehouse.android.xw4.ExpiringLinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:weightSum="1"
|
||||
>
|
||||
<TextView android:id="@+id/item_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:gravity="left"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
android:layout_weight="1"
|
||||
/>
|
||||
<TextView android:id="@+id/item_score"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="1"
|
||||
android:gravity="right"
|
||||
android:singleLine="true"
|
||||
android:layout_marginLeft="3dp"
|
||||
/>
|
||||
</org.eehouse.android.xw4.ExpiringLinearLayout>
|
||||
|
|
Loading…
Reference in a new issue