mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-28 07:58:08 +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 ) {
|
||||
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 )
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue