public class TuEditSmudgeFragment extends TuEditSmudgeFragmentBase implements BrushBarView.BrushBarViewDelegate
限定符和类型 | 类和说明 |
---|---|
static interface |
TuEditSmudgeFragment.TuEditSmudgeFragmentDelegate
图片编辑笔刷选择控制器委托
|
限定符和类型 | 字段和说明 |
---|---|
protected android.view.View.OnClickListener |
mButtonClickListener
按钮点击事件
|
protected android.view.View.OnTouchListener |
mOnTouchListener
触摸事件
|
mScreenSizeScale
permissionAlertDelegate
构造器和说明 |
---|
TuEditSmudgeFragment()
图片编辑笔刷选择控制器
|
限定符和类型 | 方法和说明 |
---|---|
protected void |
asyncLoadImageCompleted(android.graphics.Bitmap image)
异步加载图片完成
|
protected boolean |
asyncNotifyProcessing(TuSdkResult result)
异步通知处理结果
|
protected void |
dispatcherViewClick(android.view.View v)
分发视图点击事件
|
int |
getBrushBarCellLayoutId()
笔刷列表行视图布局资源ID
|
int |
getBrushBarCellWidth()
行视图宽度
|
int |
getBrushBarHeight()
笔刷栏高度
|
BrushBarView |
getBrushBarView()
笔刷栏视图
|
TuSdkTextButton |
getBrushButton()
橡皮擦按钮
|
java.util.List<java.lang.String> |
getBrushGroup()
需要显示的笔刷组 (如果为空将显示所有自定义笔刷)
|
android.view.ViewGroup |
getBrushSizeWrapView()
笔刷大小包装视图
|
android.view.View |
getBrushWrapView() |
TuSdkImageButton |
getCancelButton()
取消按钮
|
TuSdkImageButton |
getCompleteButton()
完成按钮
|
BrushSize.SizeType |
getDefaultBrushSize()
默认的笔刷大小 (默认: BrushSize.SizeType.MediumBrush,中等粗细)
|
TuEditSmudgeFragment.TuEditSmudgeFragmentDelegate |
getDelegate()
图片编辑笔刷选择控制器委托
|
protected BrushSize.SizeType |
getEraserBrushSize()
获取橡皮擦大小
|
TuSdkTextButton |
getEraserBrushSizeButton()
橡皮擦按钮
|
TuSdkImageView |
getLargeBrushSizeButton()
大笔刷大小视图
|
static int |
getLayoutId()
布局ID
|
int |
getMaxUndoCount()
允许撤销的次数 (默认: 5)
|
TuSdkImageView |
getMediumBrushSizeButton()
中笔刷大小视图
|
TuSdkImageButton |
getOriginalButton()
查看原图按钮
|
TuSdkImageView |
getRedoButton()
重做按钮
|
TuBrushSizeAnimView |
getSizeAnimView()
笔刷尺寸动画视图
|
TuSdkImageView |
getSmallBrushSizeButton()
小笔刷大小视图
|
SmudgeView |
getSmudgeView()
涂抹视图
|
TuSdkImageView |
getSuperLargeBrushSizeButton()
超大笔刷大小视图
|
TuSdkImageView |
getUndoButton()
撤销按钮
|
protected void |
handleOriginalButton(boolean isDown) |
boolean |
isSaveLastBrush()
记住用户最后一次使用的笔刷
|
protected void |
loadView(android.view.ViewGroup view)
loadView
|
protected void |
notifyProcessing(TuSdkResult result)
通知处理结果
|
void |
onBrushBarViewSelected(BrushBarView view,
BrushData data)
选中一个笔刷数据
|
void |
onBrushSizeButtonClick()
点击笔刷粗细按钮,请求切换尺寸
|
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
创建视图
|
void |
onRefreshStepStatesWithHistories(int undoCount,
int redoCount)
用户操作导致撤销/重做数据发生变化
|
boolean |
selectBrushCode(java.lang.String code)
选中一个笔刷
|
void |
setBrushBarCellLayoutId(int mBrushBarCellLayoutId)
笔刷列表行视图布局资源ID
|
void |
setBrushBarCellWidth(int mBrushBarCellWidth)
行视图宽度
|
void |
setBrushBarCellWidthDP(int mBrushBarCellWidthDP)
行视图宽度 (单位:DP)
|
void |
setBrushBarHeight(int mBrushBarHeight)
笔刷栏高度
|
void |
setBrushBarHeightDP(int mBrushBarHeightDP)
笔刷栏高度 (单位:DP)
|
void |
setBrushGroup(java.util.List<java.lang.String> mBrushGroup)
需要显示的笔刷组 (如果为空将显示所有自定义笔刷)
|
protected void |
setBrushSize(BrushSize.SizeType mBrushSize)
设置笔刷大小
|
void |
setDefaultBrushSize(BrushSize.SizeType mDefaultBrushSize)
默认的笔刷大小 (默认: BrushSize.SizeType.MediumBrush,中等粗细)
|
void |
setDelegate(TuEditSmudgeFragment.TuEditSmudgeFragmentDelegate mDelegate)
图片编辑笔刷选择控制器委托
|
protected void |
setEraserSize(BrushSize.SizeType eraserBrushSize)
设置橡皮擦大小
|
void |
setMaxUndoCount(int mMaxUndoCount)
允许撤销的次数 (默认: 5)
|
void |
setSaveLastBrush(boolean mSaveLastBrush)
记住用户最后一次使用的笔刷
|
protected void |
viewDidLoad(android.view.ViewGroup view)
初始化视图
|
asyncEditWithResult, handleBackButton, handleCompleteButton, handleOrigianlButtonDown, handleOrigianlButtonUp, handleRedoButton, handleUndoButton, onDestroyView, startSizeAnimation
asyncLoadImage, getCuterImage, getCuterImage, getImage, getImageDisplaySize, getImageSqlInfo, getPreview, getTempFilePath, handleTest, isAutoRemoveTemp, isShowResultPreview, loadImageWithThread, loadOrginImage, postProcessWithImage, preProcessWithImage, processingImage, setAutoRemoveTemp, setImage, setImageSqlInfo, setShowResultPreview, setTempFilePath, showResultPreview
addWaterMarkToImage, asyncProcessingIfNeedSave, backUIThreadNotifyProcessing, canSaveFile, getOutputCompress, getSaveToAlbumName, getWaterMarkOption, isSaveToAlbum, isSaveToTemp, saveToAlbum, saveToTemp, setOutputCompress, setSaveToAlbum, setSaveToAlbumName, setSaveToTemp, setWaterMarkOption
getErrorListener, getRequestPermissionCode, getRequiredPermissions, hasRequiredPermission, notifyError, onPermissionGrantedResult, onRequestPermissionsResult, requestRequiredPermissions, setErrorListener
alert, alert, filpModalNavigationActivity, filpModalNavigationActivity, hubDismiss, hubDismissRightNow, hubError, hubError, hubStatus, hubStatus, hubSuccess, hubSuccess, initCreateView, 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
protected android.view.View.OnClickListener mButtonClickListener
protected android.view.View.OnTouchListener mOnTouchListener
public static int getLayoutId()
public TuEditSmudgeFragment.TuEditSmudgeFragmentDelegate getDelegate()
public void setDelegate(TuEditSmudgeFragment.TuEditSmudgeFragmentDelegate mDelegate)
public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
TuFragment
onCreateView
在类中 TuFragment
protected void notifyProcessing(TuSdkResult result)
notifyProcessing
在类中 TuResultFragment
result
- SDK处理结果protected boolean asyncNotifyProcessing(TuSdkResult result)
asyncNotifyProcessing
在类中 TuResultFragment
result
- SDK处理结果public int getBrushBarCellWidth()
public void setBrushBarCellWidth(int mBrushBarCellWidth)
public void setBrushBarCellWidthDP(int mBrushBarCellWidthDP)
public int getBrushBarCellLayoutId()
笔刷列表行视图布局资源ID
- (默认:
tusdk_impl_component_widget_brush_bar_item_cell,如需自定义请继承自
BrushBarItemCellBase){@link org.lasque.tusdk.gee.v2.modules.view.widget.sumdge.BrushBarItemCellBase}
public void setBrushBarCellLayoutId(int mBrushBarCellLayoutId)
笔刷列表行视图布局资源ID
- (默认:
tusdk_impl_component_widget_brush_bar_item_cell,如需自定义请继承自
BrushBarItemCellBase){@link org.lasque.tusdk.gee.v2.modules.view.widget.sumdge.BrushBarItemCellBase}
public int getBrushBarHeight()
public void setBrushBarHeight(int mBrushBarHeight)
public void setBrushBarHeightDP(int mBrushBarHeightDP)
public boolean isSaveLastBrush()
public void setSaveLastBrush(boolean mSaveLastBrush)
public BrushSize.SizeType getDefaultBrushSize()
public void setDefaultBrushSize(BrushSize.SizeType mDefaultBrushSize)
public int getMaxUndoCount()
public void setMaxUndoCount(int mMaxUndoCount)
public java.util.List<java.lang.String> getBrushGroup()
public void setBrushGroup(java.util.List<java.lang.String> mBrushGroup)
public SmudgeView getSmudgeView()
getSmudgeView
在类中 TuEditSmudgeFragmentBase
public TuBrushSizeAnimView getSizeAnimView()
getSizeAnimView
在类中 TuEditSmudgeFragmentBase
public BrushBarView getBrushBarView()
public TuSdkImageButton getCancelButton()
public TuSdkTextButton getEraserBrushSizeButton()
public android.view.ViewGroup getBrushSizeWrapView()
public TuSdkImageView getSmallBrushSizeButton()
public TuSdkImageView getMediumBrushSizeButton()
public TuSdkImageView getLargeBrushSizeButton()
public TuSdkImageView getSuperLargeBrushSizeButton()
public android.view.View getBrushWrapView()
public TuSdkTextButton getBrushButton()
public TuSdkImageButton getCompleteButton()
public TuSdkImageView getUndoButton()
public TuSdkImageView getRedoButton()
public TuSdkImageButton getOriginalButton()
public void onRefreshStepStatesWithHistories(int undoCount, int redoCount)
onRefreshStepStatesWithHistories
在接口中 SmudgeView.SmudgeViewDelegate
onRefreshStepStatesWithHistories
在类中 TuEditSmudgeFragmentBase
undoCount
- 可以撤销的次数redoCount
- 可以重做的次数protected void dispatcherViewClick(android.view.View v)
protected void handleOriginalButton(boolean isDown)
protected void loadView(android.view.ViewGroup view)
loadView
在类中 TuEditSmudgeFragmentBase
protected void viewDidLoad(android.view.ViewGroup view)
TuSdkFragment
viewDidLoad
在类中 TuEditSmudgeFragmentBase
protected void asyncLoadImageCompleted(android.graphics.Bitmap image)
protected void setBrushSize(BrushSize.SizeType mBrushSize)
mBrushSize
- protected void setEraserSize(BrushSize.SizeType eraserBrushSize)
eraserBrushSize
- protected BrushSize.SizeType getEraserBrushSize()
public void onBrushBarViewSelected(BrushBarView view, BrushData data)
onBrushBarViewSelected
在接口中 BrushBarView.BrushBarViewDelegate
view
- 笔刷栏视图data
- 笔刷数据public boolean selectBrushCode(java.lang.String code)
TuEditSmudgeFragmentBase
selectBrushCode
在类中 TuEditSmudgeFragmentBase
code
- 笔刷代号public void onBrushSizeButtonClick()
BrushBarView.BrushBarViewDelegate