mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +01:00
don't put up zoom control in landscape mode. There just isn't room
and it in effect disables the tray. Rather, think of landscape as zoomed mode: no zooming necessary. Volume controls still zoom if enabled.
This commit is contained in:
parent
e727fa7a03
commit
7b897acfc1
1 changed files with 11 additions and 6 deletions
|
@ -132,15 +132,11 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
|
||||||
|
|
||||||
switch ( action ) {
|
switch ( action ) {
|
||||||
case MotionEvent.ACTION_DOWN:
|
case MotionEvent.ACTION_DOWN:
|
||||||
if ( m_useZoomControl && m_canZoom ) {
|
enableZoomControlsIf();
|
||||||
m_zoomButtons.setVisible( true );
|
|
||||||
}
|
|
||||||
m_jniThread.handle( JNIThread.JNICmd.CMD_PEN_DOWN, xx, yy );
|
m_jniThread.handle( JNIThread.JNICmd.CMD_PEN_DOWN, xx, yy );
|
||||||
break;
|
break;
|
||||||
case MotionEvent.ACTION_MOVE:
|
case MotionEvent.ACTION_MOVE:
|
||||||
if ( m_useZoomControl && m_canZoom ) {
|
enableZoomControlsIf();
|
||||||
m_zoomButtons.setVisible( true );
|
|
||||||
}
|
|
||||||
m_jniThread.handle( JNIThread.JNICmd.CMD_PEN_MOVE, xx, yy );
|
m_jniThread.handle( JNIThread.JNICmd.CMD_PEN_MOVE, xx, yy );
|
||||||
break;
|
break;
|
||||||
case MotionEvent.ACTION_UP:
|
case MotionEvent.ACTION_UP:
|
||||||
|
@ -307,6 +303,15 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
|
||||||
return layoutDone;
|
return layoutDone;
|
||||||
} // layoutBoardOnce
|
} // layoutBoardOnce
|
||||||
|
|
||||||
|
private void enableZoomControlsIf()
|
||||||
|
{
|
||||||
|
if ( m_useZoomControl && m_canZoom ) {
|
||||||
|
if ( m_layoutWidth <= m_layoutHeight ) {
|
||||||
|
m_zoomButtons.setVisible( true );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// BoardHandler interface implementation
|
// BoardHandler interface implementation
|
||||||
public void startHandling( JNIThread thread, int gamePtr, CurGameInfo gi )
|
public void startHandling( JNIThread thread, int gamePtr, CurGameInfo gi )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue