public abstract class TuCameraFragmentBase extends TuResultFragment
permissionAlertDelegate
构造器和说明 |
---|
TuCameraFragmentBase() |
限定符和类型 | 方法和说明 |
---|---|
protected void |
asyncProcessingIfNeedSave(TuSdkResult result)
异步处理如果需要保存文件 (默认完成后执行:notifyProcessing(TuSdkResult result))
|
protected abstract void |
configCamera(TuSdkStillCameraInterface camera)
配置相机参数
|
abstract CameraConfigs.CameraFacing |
getAvPostion()
相机方向 (默认:CameraFacing.Back)
CameraConfigs.CameraFacing |
TuSdkStillCameraInterface |
getCamera()
相机对象
|
abstract android.widget.RelativeLayout |
getCameraView()
相机视图
|
abstract float |
getCameraViewRatio()
视频视图显示比例 (默认:0, 0 <= mRegionRatio, 当设置为0时全屏显示)
|
float |
getCurrentRatio()
获取当前显示比例
|
int |
getCurrentRatioType()
获取显示比例类型
|
protected float |
getPreviewOffsetTopPercent(int ratioType)
获取当前 Ratio 预览画面顶部偏移百分比(默认:-1 居中显示 取值范围:0-1)
|
int |
getRatioType()
视频视图显示比例类型 (默认:RatioType.ratio_all, 如果设置CameraViewRatio > 0,
将忽略RatioType)
|
java.lang.String[] |
getRequiredPermissions()
组件运行需要的权限列表
|
protected void |
handleCameraRatio()
切换相机显示比例
|
protected void |
handleCaptureButton()
点击拍摄
|
protected void |
handleCaptureWithVolume()
按音量键拍摄
|
protected void |
handleCloseButton()
关闭视图
|
protected void |
handleFlashModel(CameraConfigs.CameraFlash flashMode)
切换闪光灯模式
|
protected void |
handleGuideLineButton()
切换辅助线显示
|
protected void |
handleSwitchButton()
切换前后摄像头
|
protected boolean |
handleSwitchFilter(java.lang.String code)
切换滤镜
|
protected void |
initCameraView()
初始化相机及控件
|
protected void |
loadView(android.view.ViewGroup view)
loadView
|
protected abstract void |
onCameraStateChangedImpl(TuSdkStillCameraInterface camera,
TuSdkStillCameraAdapter.CameraState state)
相机状态改变
|
protected abstract void |
onCameraTakedPictureImpl(TuSdkStillCameraInterface camera,
TuSdkResult result)
获取拍摄图片
|
void |
onDestroyView() |
protected void |
onFilterChanged(org.lasque.tusdk.core.seles.sources.SelesOutInput selesOutInput)
滤镜改变事件
|
protected void |
setCurrentRatioType(int ratioType)
设置当前比例类型
|
void |
setRatioType(int mRatioType)
视频视图显示比例类型 (默认:RatioType.ratio_all, 如果设置CameraViewRatio > 0,
将忽略RatioType)
|
protected void |
viewDidLoad(android.view.ViewGroup view)
初始化视图
|
addWaterMarkToImage, asyncNotifyProcessing, backUIThreadNotifyProcessing, canSaveFile, getOutputCompress, getSaveToAlbumName, getWaterMarkOption, isSaveToAlbum, isSaveToTemp, notifyProcessing, saveToAlbum, saveToTemp, setOutputCompress, setSaveToAlbum, setSaveToAlbumName, setSaveToTemp, setWaterMarkOption
getErrorListener, getRequestPermissionCode, hasRequiredPermission, notifyError, onPermissionGrantedResult, onRequestPermissionsResult, requestRequiredPermissions, setErrorListener
alert, alert, filpModalNavigationActivity, filpModalNavigationActivity, hubDismiss, hubDismissRightNow, hubError, hubError, hubStatus, hubStatus, hubSuccess, hubSuccess, initCreateView, onCreateView, onDetach, presentActivity, presentModalNavigationActivity, presentModalNavigationActivity, presentModalNavigationActivity, pushModalNavigationActivity, pushModalNavigationActivity, setNavLeftButton, setNavLeftButton, setNavLeftButton, setNavLeftHighLightButton, setNavLeftHighLightButton, setNavRightButton, setNavRightButton, setNavRightButton, setNavRightHighLightButton, setNavRightHighLightButton
addOrientationListener, backStackEntryCount, bindSoftInputEvent, dismissActivity, dismissActivityWithAnim, dismissActivityWithAnim, equalViewIds, filpModalNavigationActivity, getDismissAnimType, getNavButton, getOriginFragment, getResColor, getResString, getResString, getResString, getResString, getRootView, getRootViewLayoutId, getSdkActivity, getTitle, getViewById, getViewById, getViewId, isBackButtonShowed, isFragmentPause, isFullScreen, isSupportSlideBack, navigatorBarBackAction, navigatorBarCancelAction, navigatorBarHeight, navigatorBarLeftAction, navigatorBarLoaded, navigatorBarRightAction, navSearchViewSearch, navSearchViewSetDelegate, navSegmentedAddTexts, navSegmentedAddTexts, navSegmentedSetDelegate, navSegmentedSetected, onAttach, onBackForSlide, onBackPressed, onCreateAnimation, onDestroy, onFragmentAnimationEnd, onKeyUp, onNavigatorBarButtonClicked, onOrientationChanged, onPause, onPauseFragment, onPreDraw, onRefreshData, onResume, onResumeFragment, popFragment, popFragment, popFragmentRoot, presentActivity, presentActivity, presentModalNavigationActivity, presentModalNavigationActivity, presentModalNavigationActivity, pushFragment, refreshOriginFragment, replaceFragment, runOnUiThread, setIsSupportSlideBack, setNavigatorBarId, setNavigatorBarOnButtom, setNavLeftButton, setNavLeftButton, setNavRightButton, setNavRightButton, setOriginFragment, setRequestedOrientation, setRootViewLayoutId, setTitle, setTitle, showBackButton, showNavigatorBar, showView, showViewIn, wantFullScreen
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPrepareOptionsMenu, onSaveInstanceState, onStart, onStop, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, requireActivity, requireContext, requireFragmentManager, requireHost, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
public TuSdkStillCameraInterface getCamera()
public abstract float getCameraViewRatio()
public abstract android.widget.RelativeLayout getCameraView()
public abstract CameraConfigs.CameraFacing getAvPostion()
CameraConfigs.CameraFacing
protected abstract void configCamera(TuSdkStillCameraInterface camera)
protected abstract void onCameraStateChangedImpl(TuSdkStillCameraInterface camera, TuSdkStillCameraAdapter.CameraState state)
protected abstract void onCameraTakedPictureImpl(TuSdkStillCameraInterface camera, TuSdkResult result)
protected void loadView(android.view.ViewGroup view)
loadView
在类中 TuSdkFragment
protected void viewDidLoad(android.view.ViewGroup view)
TuSdkFragment
viewDidLoad
在类中 TuSdkFragment
protected void initCameraView()
public void onDestroyView()
onDestroyView
在类中 TuResultFragment
protected void onFilterChanged(org.lasque.tusdk.core.seles.sources.SelesOutInput selesOutInput)
selesOutInput
- protected void asyncProcessingIfNeedSave(TuSdkResult result)
public java.lang.String[] getRequiredPermissions()
getRequiredPermissions
在类中 TuComponentFragment
protected void handleFlashModel(CameraConfigs.CameraFlash flashMode)
protected void handleCaptureButton()
protected void handleCaptureWithVolume()
protected void handleSwitchButton()
protected boolean handleSwitchFilter(java.lang.String code)
protected void handleCloseButton()
public final int getRatioType()
public final void setRatioType(int mRatioType)
public float getCurrentRatio()
public int getCurrentRatioType()
protected float getPreviewOffsetTopPercent(int ratioType)
ratioType
- protected void setCurrentRatioType(int ratioType)
protected void handleCameraRatio()
protected void handleGuideLineButton()