mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
don't show remaining tiles when <= 0
This commit is contained in:
parent
97569ae6d0
commit
ea07f92b28
1 changed files with 14 additions and 9 deletions
|
@ -301,7 +301,9 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
|
||||||
public void measureRemText( Rect r, int nTilesLeft, int[] width,
|
public void measureRemText( Rect r, int nTilesLeft, int[] width,
|
||||||
int[] height )
|
int[] height )
|
||||||
{
|
{
|
||||||
m_remText = String.format( "%d", nTilesLeft ); // should cache a formatter
|
if ( nTilesLeft > 0 ) {
|
||||||
|
// should cache a formatter
|
||||||
|
m_remText = String.format( "%d", nTilesLeft );
|
||||||
m_fillPaint.setTextSize( r.bottom - r.top - 2 );
|
m_fillPaint.setTextSize( r.bottom - r.top - 2 );
|
||||||
m_fillPaint.getTextBounds( m_remText, 0, m_remText.length(),
|
m_fillPaint.getTextBounds( m_remText, 0, m_remText.length(),
|
||||||
m_boundsScratch );
|
m_boundsScratch );
|
||||||
|
@ -312,6 +314,9 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
|
||||||
}
|
}
|
||||||
width[0] = minWidth;
|
width[0] = minWidth;
|
||||||
height[0] = m_boundsScratch.bottom;
|
height[0] = m_boundsScratch.bottom;
|
||||||
|
} else {
|
||||||
|
width[0] = height[0] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawRemText( Rect rInner, Rect rOuter, int nTilesLeft,
|
public void drawRemText( Rect rInner, Rect rOuter, int nTilesLeft,
|
||||||
|
|
Loading…
Add table
Reference in a new issue