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:
Andy2 2010-06-08 22:40:17 -07:00
parent e727fa7a03
commit 7b897acfc1

View file

@ -132,15 +132,11 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
switch ( action ) {
case MotionEvent.ACTION_DOWN:
if ( m_useZoomControl && m_canZoom ) {
m_zoomButtons.setVisible( true );
}
enableZoomControlsIf();
m_jniThread.handle( JNIThread.JNICmd.CMD_PEN_DOWN, xx, yy );
break;
case MotionEvent.ACTION_MOVE:
if ( m_useZoomControl && m_canZoom ) {
m_zoomButtons.setVisible( true );
}
enableZoomControlsIf();
m_jniThread.handle( JNIThread.JNICmd.CMD_PEN_MOVE, xx, yy );
break;
case MotionEvent.ACTION_UP:
@ -307,6 +303,15 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
return layoutDone;
} // layoutBoardOnce
private void enableZoomControlsIf()
{
if ( m_useZoomControl && m_canZoom ) {
if ( m_layoutWidth <= m_layoutHeight ) {
m_zoomButtons.setVisible( true );
}
}
}
// BoardHandler interface implementation
public void startHandling( JNIThread thread, int gamePtr, CurGameInfo gi )
{