public abstract class TuSdkComponent extends java.lang.Object implements TuSdkComponentErrorListener
限定符和类型 | 类和说明 |
---|---|
static interface |
TuSdkComponent.TuSdkComponentDelegate
组件委托
|
构造器和说明 |
---|
TuSdkComponent(android.app.Activity activity)
组件基础类
|
限定符和类型 | 方法和说明 |
---|---|
android.app.Activity |
activity()
内容上下文
|
void |
alert(TuSdkViewHelper.AlertDelegate delegate,
int titleId,
int msgId)
提示用户信息
|
void |
alert(TuSdkViewHelper.AlertDelegate delegate,
java.lang.String title,
java.lang.String msg)
提示用户信息
|
TuSdkComponent.TuSdkComponentDelegate |
getDelegate()
组件委托
|
java.lang.String |
getResString(int resId)
获取资源字符串
|
java.lang.String |
getResString(java.lang.String resName)
获取资源字符串
|
protected abstract void |
initComponent()
初始化组件
|
boolean |
isAutoDismissWhenCompleted()
是否在组件执行完成后自动关闭组件 (默认:false)
|
protected void |
notifyResult(TuSdkResult result,
java.lang.Error error,
TuFragment lastFragment)
通知组件操作完成
|
void |
onComponentError(TuFragment fragment,
TuSdkResult result,
java.lang.Error error)
获取组件返回错误信息
|
void |
presentActivity(TuSdkIntent intent,
boolean isDestory)
开启新的Activity
|
void |
presentModalNavigationActivity(androidx.fragment.app.Fragment fragment)
弹出新的Activity
|
void |
presentModalNavigationActivity(androidx.fragment.app.Fragment fragment,
ActivityAnimType presentAnim,
ActivityAnimType dismissAnim,
boolean wantFullScreen)
启动新的Activity
|
void |
presentModalNavigationActivity(androidx.fragment.app.Fragment fragment,
boolean wantFullScreen)
弹出新的Activity
|
void |
pushModalNavigationActivity(androidx.fragment.app.Fragment fragment)
弹出新的Activity,左右切换
|
void |
pushModalNavigationActivity(androidx.fragment.app.Fragment fragment,
boolean wantFullScreen)
弹出新的Activity,左右切换
|
TuSdkComponent |
setAutoDismissWhenCompleted(boolean mAutoDismissWhenCompleted)
是否在组件执行完成后自动关闭组件 (默认:false)
|
void |
setDelegate(TuSdkComponent.TuSdkComponentDelegate delegate)
组件委托
|
boolean |
showAlertIfCannotSaveFile()
如果不支持文件存储弹出警告信息
|
abstract TuSdkComponent |
showComponent()
显示组件
|
public android.app.Activity activity()
public TuSdkComponent.TuSdkComponentDelegate getDelegate()
public void setDelegate(TuSdkComponent.TuSdkComponentDelegate delegate)
public boolean isAutoDismissWhenCompleted()
public TuSdkComponent setAutoDismissWhenCompleted(boolean mAutoDismissWhenCompleted)
protected abstract void initComponent()
public abstract TuSdkComponent showComponent()
protected void notifyResult(TuSdkResult result, java.lang.Error error, TuFragment lastFragment)
result
- 返回结果error
- 异常信息lastFragment
- 最后显示的控制器public void onComponentError(TuFragment fragment, TuSdkResult result, java.lang.Error error)
onComponentError
在接口中 TuSdkComponentErrorListener
fragment
- result
- 返回结果error
- 异常信息public boolean showAlertIfCannotSaveFile()
context
- public void presentActivity(TuSdkIntent intent, boolean isDestory)
public void presentModalNavigationActivity(androidx.fragment.app.Fragment fragment)
public void presentModalNavigationActivity(androidx.fragment.app.Fragment fragment, boolean wantFullScreen)
fragment
- 加载的fragment实例wantFullScreen
- 是否需要全屏public void pushModalNavigationActivity(androidx.fragment.app.Fragment fragment)
fragment
- 加载的fragment实例public void pushModalNavigationActivity(androidx.fragment.app.Fragment fragment, boolean wantFullScreen)
fragment
- 加载的fragment实例wantFullScreen
- 是否需要全屏public void presentModalNavigationActivity(androidx.fragment.app.Fragment fragment, ActivityAnimType presentAnim, ActivityAnimType dismissAnim, boolean wantFullScreen)
fragment
- 加载的fragment实例presentAnim
- 弹出时动画dismissAnim
- 退出时动画wantFullScreen
- 是否需要全屏public void alert(TuSdkViewHelper.AlertDelegate delegate, int titleId, int msgId)
public void alert(TuSdkViewHelper.AlertDelegate delegate, java.lang.String title, java.lang.String msg)
public java.lang.String getResString(int resId)
public java.lang.String getResString(java.lang.String resName)