mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
add zoom button that toggles between zooming in and out
This commit is contained in:
parent
0c852981e7
commit
5b04bc6382
1 changed files with 12 additions and 1 deletions
|
@ -370,7 +370,7 @@ public class BoardActivity extends Activity implements UtilCtxt {
|
||||||
case KeyEvent.KEYCODE_VOLUME_UP:
|
case KeyEvent.KEYCODE_VOLUME_UP:
|
||||||
if ( m_volKeysZoom ) {
|
if ( m_volKeysZoom ) {
|
||||||
int zoomBy = KeyEvent.KEYCODE_VOLUME_DOWN == keyCode
|
int zoomBy = KeyEvent.KEYCODE_VOLUME_DOWN == keyCode
|
||||||
? -1 : 1;
|
? -2 : 2;
|
||||||
handled = doZoom( zoomBy );
|
handled = doZoom( zoomBy );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -757,6 +757,17 @@ public class BoardActivity extends Activity implements UtilCtxt {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
m_toolbar.addButton( this, "<V>", listener );
|
m_toolbar.addButton( this, "<V>", listener );
|
||||||
|
|
||||||
|
listener = new View.OnClickListener() {
|
||||||
|
private boolean m_goIn = true;
|
||||||
|
@Override
|
||||||
|
public void onClick( View view ) {
|
||||||
|
m_jniThread.handle( JNIThread.JNICmd.CMD_ZOOM,
|
||||||
|
m_goIn? 8 : -8 );
|
||||||
|
m_goIn = !m_goIn;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
m_toolbar.addButton( this, "<Z>", listener );
|
||||||
}
|
}
|
||||||
|
|
||||||
private DialogInterface.OnDismissListener makeODLforBlocking()
|
private DialogInterface.OnDismissListener makeODLforBlocking()
|
||||||
|
|
Loading…
Reference in a new issue