add zoom button that toggles between zooming in and out

This commit is contained in:
Andy2 2010-06-27 13:13:30 -07:00
parent 0c852981e7
commit 5b04bc6382

View file

@ -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()