Code example for KeyEvent

Methods: isCanceledisTracking

0
		return super.onKeyDown(keyCode, event);
	} 
 
	@Override 
	public boolean onKeyUp(int keyCode, KeyEvent event) {
		if (keyCode == KeyEvent.KEYCODE_BACK && event.isTracking()
				&& !event.isCanceled()) {
			if (getScale() > mMinZoom) {
				zoomTo(mMinZoom);
				return true; 
			} 
		} 
		return super.onKeyUp(keyCode, event);
	} 
 
	public int getImageWidth() { 
		return imageWidth;
	} 
 
	public void setImageWidth(int imageWidth) {
		this.imageWidth = imageWidth;