public class H5DialogFragment extends RTLDialogFragment
限定符和类型 | 类和说明 |
---|---|
static interface |
H5DialogFragment.ChatRoomCallBack |
static interface |
H5DialogFragment.H5ClickToOpenGift |
static interface |
H5DialogFragment.H5DailyTaskCallback |
static class |
H5DialogFragment.H5Params |
static class |
H5DialogFragment.H5TYPE |
static interface |
H5DialogFragment.RechargeListener |
static class |
H5DialogFragment.Size
设置dialog宽高,当前版本只判断width和height大于0
|
限定符和类型 | 字段和说明 |
---|---|
static int |
BOTTOM_BTN_TYPE_FEEDBACK |
static int |
BOTTOM_BTN_TYPE_HIDE |
protected java.lang.String |
broadcastUid |
protected boolean |
fromGameCenter |
protected GameCenterInfo |
info |
protected boolean |
isGameIn |
protected boolean |
isLiveBoardIn |
protected boolean |
isLiveNewTaskBonus |
protected android.os.Handler |
mHandler |
protected boolean |
mIsDestoryWebview
是否销毁webview相关的资源,有需求需要fra销毁但是webview不销毁。
|
protected RoundRectWebView |
mWebView |
protected H5DialogFragment.H5ClickToOpenGift |
onOpenGiftListener |
protected static java.lang.String |
TAG |
static java.lang.String |
URL |
protected java.lang.String |
videoId |
hasSaveInstanceState
构造器和说明 |
---|
H5DialogFragment(H5DialogFragment.ChatRoomCallBack chatRoomCallBack) |
限定符和类型 | 方法和说明 |
---|---|
void |
callJSMethod(java.lang.String methodName,
java.lang.String param1,
int param2)
调用JS的方法
|
void |
dismissH5Dialog() |
void |
dismissH5DialogNotDestoryWebview() |
int |
getmBottomBtnType() |
java.lang.String |
getmTitleTxt() |
android.widget.TextView |
getmTitlteTV() |
java.lang.String |
getmUrl() |
void |
hideStandardKeyboard() |
protected void |
initView() |
boolean |
isAlignBottom() |
boolean |
isHideClose() |
boolean |
isIsLiveBoardIn() |
boolean |
ismNeedHideTitleBar() |
boolean |
isShowing() |
protected void |
jsReduceCose(java.lang.String str) |
protected void |
jsReducePageSize(java.lang.String str) |
void |
musicLiveJump(java.lang.String URL)
新任务宝箱跳转
|
void |
onCreate(android.os.Bundle savedInstanceState) |
android.app.Dialog |
onCreateDialog(android.os.Bundle savedInstanceState) |
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState) |
void |
onDestroy() |
void |
onResume() |
void |
onStart() |
boolean |
onTouchMaskView() |
void |
setAlignBottom(boolean alignBottom) |
void |
setChatRoomCallBack(H5DialogFragment.ChatRoomCallBack callBack) |
void |
setFromGameCenter(boolean b,
GameCenterInfo info,
java.lang.String videoId,
java.lang.String broadcastUid) |
void |
setGameIn(boolean gameIn) |
void |
setHideClose(boolean hideClose) |
void |
setHost(boolean host) |
void |
setIsLiveBoardIn(boolean isLiveBoardIn) |
void |
setmBottomBtnType(int mBottomBtnType) |
void |
setmFragmentManager(androidx.fragment.app.FragmentManager mFragmentManager) |
void |
setmIsDestoryWebview(boolean mIsDestoryWebview) |
void |
setmNeedHideTitleBar(boolean mNeedHideTitleBar) |
void |
setmTitleTxt(java.lang.String mTitleTxt) |
void |
setmTitlteTV(android.widget.TextView mTitlteTV) |
void |
setmUrl(java.lang.String mUrl)
这个过程中只是校验格式是不是正确,没有涉及编解码。
|
void |
setOnOpenGiftListener(H5DialogFragment.H5ClickToOpenGift onOpenGiftListener) |
void |
setOtherParams(H5DialogFragment.H5Params p) |
void |
setRechargeListener(H5DialogFragment.RechargeListener rechargeListener) |
void |
setSize(H5DialogFragment.Size size) |
protected void |
setWebViewBackground() |
void |
showH5Dialog(androidx.fragment.app.FragmentManager manager,
java.lang.String tag) |
void |
showShareToolbar(java.lang.String jsonParam) |
void |
startH5DailyTask(java.lang.String url,
H5DialogFragment.H5DailyTaskCallback callback)
每日任务
|
void |
startStarH5Page(java.lang.String URL,
StarH5CallBack callBack,
boolean isBeam,
H5DialogFragment.H5ClickToOpenGift onOpenGiftListener)
直播间星光榜单
|
dismiss, dismissAllowingStateLoss, onAttach, onSaveInstanceState, onViewCreated, show
getDialog, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onCancel, onDestroyView, onDetach, onDismiss, onGetLayoutInflater, onStop, requireDialog, setCancelable, setShowsDialog, setStyle, setupDialog, show, showNow
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, 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, onActivityResult, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onViewStateRestored, postponeEnterTransition, postponeEnterTransition, registerForContextMenu, requestPermissions, requireActivity, requireArguments, requireContext, requireFragmentManager, requireHost, requireParentFragment, requireView, 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 static final java.lang.String TAG
protected RoundRectWebView mWebView
public static final int BOTTOM_BTN_TYPE_HIDE
public static final int BOTTOM_BTN_TYPE_FEEDBACK
public static final java.lang.String URL
protected boolean isGameIn
protected boolean isLiveBoardIn
protected boolean isLiveNewTaskBonus
protected H5DialogFragment.H5ClickToOpenGift onOpenGiftListener
protected boolean fromGameCenter
protected GameCenterInfo info
protected java.lang.String videoId
protected java.lang.String broadcastUid
protected android.os.Handler mHandler
protected boolean mIsDestoryWebview
public H5DialogFragment(H5DialogFragment.ChatRoomCallBack chatRoomCallBack)
public void setOnOpenGiftListener(H5DialogFragment.H5ClickToOpenGift onOpenGiftListener)
public void setChatRoomCallBack(H5DialogFragment.ChatRoomCallBack callBack)
public void setRechargeListener(H5DialogFragment.RechargeListener rechargeListener)
public void setmFragmentManager(androidx.fragment.app.FragmentManager mFragmentManager)
public void setHost(boolean host)
public void onCreate(android.os.Bundle savedInstanceState)
onCreate
在类中 androidx.fragment.app.DialogFragment
@NonNull public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState)
onCreateDialog
在类中 androidx.fragment.app.DialogFragment
@Nullable public android.view.View onCreateView(android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup container, android.os.Bundle savedInstanceState)
onCreateView
在类中 androidx.fragment.app.Fragment
public void onStart()
onStart
在类中 androidx.fragment.app.DialogFragment
protected void initView()
protected void setWebViewBackground()
public void onDestroy()
onDestroy
在类中 androidx.fragment.app.Fragment
public boolean onTouchMaskView()
public void showShareToolbar(java.lang.String jsonParam)
public void callJSMethod(java.lang.String methodName, java.lang.String param1, int param2)
methodName
- JS方法名称param1
- 参数1,类型为字符串param2
- 参数2,类型为整型public void setFromGameCenter(boolean b, GameCenterInfo info, java.lang.String videoId, java.lang.String broadcastUid)
public void hideStandardKeyboard()
public java.lang.String getmUrl()
public void setmUrl(java.lang.String mUrl)
mUrl
- public void setSize(H5DialogFragment.Size size)
public void onResume()
onResume
在类中 RTLDialogFragment
public android.widget.TextView getmTitlteTV()
public void setmTitlteTV(android.widget.TextView mTitlteTV)
public boolean ismNeedHideTitleBar()
public void setmNeedHideTitleBar(boolean mNeedHideTitleBar)
public java.lang.String getmTitleTxt()
public void setmTitleTxt(java.lang.String mTitleTxt)
public boolean isHideClose()
public void setHideClose(boolean hideClose)
public int getmBottomBtnType()
public void setmBottomBtnType(int mBottomBtnType)
public void showH5Dialog(androidx.fragment.app.FragmentManager manager, java.lang.String tag)
public void dismissH5Dialog()
public void dismissH5DialogNotDestoryWebview()
public boolean isShowing()
public void setGameIn(boolean gameIn)
public boolean isIsLiveBoardIn()
public void setIsLiveBoardIn(boolean isLiveBoardIn)
public boolean isAlignBottom()
public void setAlignBottom(boolean alignBottom)
public void startStarH5Page(java.lang.String URL, StarH5CallBack callBack, boolean isBeam, H5DialogFragment.H5ClickToOpenGift onOpenGiftListener)
URL
- public void startH5DailyTask(java.lang.String url, H5DialogFragment.H5DailyTaskCallback callback)
callback
- public void musicLiveJump(java.lang.String URL)
URL
- public void setOtherParams(H5DialogFragment.H5Params p)
protected void jsReducePageSize(java.lang.String str)
protected void jsReduceCose(java.lang.String str)
public void setmIsDestoryWebview(boolean mIsDestoryWebview)