Code example for OrientationEventListener

Methods: canDetectOrientation, enable

-2
		    		orientationChanged(degreesQuantized);
		    	} 
		    } 
		}; 
		 
		if (orientationEventListener.canDetectOrientation()){
			orientationEventListener.enable();
		} 
	} 
	 
	protected void orientationChanged(int degrees){
		Log.v(TAG, "degrees "+degrees);
		for(OrientationChangedListener listener : this.listeners){
			listener.orientationChanged(degreesQuantized);
		} 
	} 
	 
	public Bitmap cropAndRotateBitmap(Bitmap bitmap, Rect cropRect){
		Log.v(TAG, "cropAndRotateBitmap()");
		Log.v(TAG, "bitmap: "+bitmap);
		Log.v(TAG, "orientation: "+orientation);