java.lang.Object | |
↳ | org.opencdnunion.media.streamer.capture.camera.CameraTouchHelper |
Handle touch events for camera view.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | CameraTouchHelper.OnTouchListener |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CameraTouchHelper() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
synchronized void | addTouchListener(CameraTouchHelper.OnTouchListener touchListener) | ||||||||||
boolean | onTouch(View view, MotionEvent event) | ||||||||||
synchronized void | removeAllTouchListener() | ||||||||||
synchronized void | removeTouchListener(CameraTouchHelper.OnTouchListener touchListener) | ||||||||||
void |
setCameraCapture(CameraCapture cameraCapture)
Set CameraCapture instance, without whom touch focus and zoom would not work.
| ||||||||||
void |
setCameraHintView(ICameraHintView view)
Set a CameraHintView to show touch focus status and zoom value.
| ||||||||||
void |
setEnableTouchFocus(boolean enableTouchFocus)
Enable touch focus or not.
| ||||||||||
void |
setEnableZoom(boolean enableZoom)
Enable zoom camera with gestures or not.
| ||||||||||
void |
setFocusAreaRadius(float radius)
Set radius of focus square, relative to the short edge of preview view.
| ||||||||||
void |
setMaxZoomRatio(float maxZoomRatio)
Set max zoom value, will use the smaller one between the set value
and max zoom value that hardware supported.
| ||||||||||
void |
setRefocusDelay(int delay)
Set delay time to reset to previous focus mode after touch focused.
| ||||||||||
void |
setZoomSpeed(float zoomSpeed)
Set zoom in/out speed while using scale gestures.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Set CameraCapture instance, without whom touch focus and zoom would not work.
cameraCapture | CameraCapture instance to set |
---|
Set a CameraHintView to show touch focus status and zoom value.
view | view implements ICameraHintView |
---|
Enable touch focus or not. Default enabled.
enableTouchFocus | true to enable, false to disable |
---|
Enable zoom camera with gestures or not. Default enabled.
enableZoom | true to enable, false to disable |
---|
Set radius of focus square, relative to the short edge of preview view.
The default value is 0.083.
radius | must be 0-0.5, or exception occur. |
---|
IllegalArgumentException |
---|
Set max zoom value, will use the smaller one between the set value
and max zoom value that hardware supported.
The default value is 4.0f.
maxZoomRatio | value that bigger than 1.0f, 1.0 means no zoom. |
---|
Set delay time to reset to previous focus mode after touch focused.
The default value is 5000.
delay | delay time in milliseconds, 0 or negative value means never. |
---|
Set zoom in/out speed while using scale gestures.
zoomSpeed | valid in 0.1f~10.f, default 1.0f. |
---|