mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-15 15:41:24 +01:00
draw board img at very top of screen if zoom controls are enabled so
that they appear below tray and don't steal events from tray. There should be a better way to do this but it's a big improvement.
This commit is contained in:
parent
9f48c4f99b
commit
4eb7f80cca
1 changed files with 7 additions and 2 deletions
|
@ -137,7 +137,7 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
|
||||||
{
|
{
|
||||||
int action = event.getAction();
|
int action = event.getAction();
|
||||||
int xx = (int)event.getX();
|
int xx = (int)event.getX();
|
||||||
int yy = (int)event.getY() - m_top;
|
int yy = (int)event.getY() - getCurTop();
|
||||||
|
|
||||||
switch ( action ) {
|
switch ( action ) {
|
||||||
case MotionEvent.ACTION_DOWN:
|
case MotionEvent.ACTION_DOWN:
|
||||||
|
@ -169,7 +169,7 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
|
||||||
{
|
{
|
||||||
synchronized( this ) {
|
synchronized( this ) {
|
||||||
if ( layoutBoardOnce() ) {
|
if ( layoutBoardOnce() ) {
|
||||||
canvas.drawBitmap( m_bitmap, 0, m_top, m_drawPaint );
|
canvas.drawBitmap( m_bitmap, 0, getCurTop(), m_drawPaint );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -235,6 +235,11 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int getCurTop()
|
||||||
|
{
|
||||||
|
return m_useZoomControl ? 0 : m_top;
|
||||||
|
}
|
||||||
|
|
||||||
private boolean layoutBoardOnce()
|
private boolean layoutBoardOnce()
|
||||||
{
|
{
|
||||||
final int width = getWidth();
|
final int width = getWidth();
|
||||||
|
|
Loading…
Reference in a new issue