Package ai.nexconn.chatui.picture.widget
Class BaseDialogFragment
-
- All Implemented Interfaces:
-
android.content.ComponentCallbacks,android.content.DialogInterface.OnCancelListener,android.content.DialogInterface.OnDismissListener,android.view.View.OnCreateContextMenuListener,androidx.activity.result.ActivityResultCaller,androidx.lifecycle.HasDefaultViewModelProviderFactory,androidx.lifecycle.LifecycleOwner,androidx.lifecycle.ViewModelStoreOwner,androidx.savedstate.SavedStateRegistryOwner
public abstract class BaseDialogFragment extends DialogFragmentCreated by lhz on 2020/11/30
-
-
Field Summary
Fields Modifier and Type Field Description protected ViewmRootViewprotected DialogmDialogpublic final static intSTYLE_NORMALpublic final static intSTYLE_NO_TITLEpublic final static intSTYLE_NO_FRAMEpublic final static intSTYLE_NO_INPUT
-
Constructor Summary
Constructors Constructor Description BaseDialogFragment()
-
Method Summary
Modifier and Type Method Description voidonCreate(@Nullable() Bundle savedInstanceState)voidonActivityCreated(Bundle savedInstanceState)intgetGravity()intgetScreenHeightProportion()intgetBackgroundDrawableRes()floatgetScreenWidthProportion()Screen proportion floatgetVerticalMovement()Set vertical offset floatgetHorizontalMovement()Set horizontal offset voidshow(FragmentManager manager)ViewonCreateView(@NonNull() LayoutInflater inflater, @Nullable() ViewGroup container, @Nullable() Bundle savedInstanceState)abstract voidfindView()abstract voidinitView()abstract voidbindData()abstract intgetContentView()-
Methods inherited from class androidx.fragment.app.DialogFragment
dismiss, dismissAllowingStateLoss, getDialog, getShowsDialog, getTheme, isCancelable, onAttach, onCancel, onCreateDialog, onDestroyView, onDetach, onDismiss, onGetLayoutInflater, onSaveInstanceState, onStart, onStop, onViewStateRestored, requireDialog, setCancelable, setShowsDialog, setStyle, setupDialog, show, show, showNow -
Methods inherited from class androidx.fragment.app.Fragment
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getDefaultViewModelProviderFactory, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getParentFragmentManager, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSavedStateRegistry, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hasOptionsMenu, hashCode, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityResult, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onPrimaryNavigationFragmentChanged, onRequestPermissionsResult, onResume, onViewCreated, postponeEnterTransition, registerForActivityResult, 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, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu -
Methods inherited from class androidx.lifecycle.HasDefaultViewModelProviderFactory
getDefaultViewModelCreationExtras -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
onCreate
void onCreate(@Nullable() Bundle savedInstanceState)
-
onActivityCreated
void onActivityCreated(Bundle savedInstanceState)
-
getGravity
int getGravity()
-
getScreenHeightProportion
int getScreenHeightProportion()
- Returns:
the height proportion of the screen
-
getBackgroundDrawableRes
@DrawableRes() int getBackgroundDrawableRes()
-
getScreenWidthProportion
float getScreenWidthProportion()
Screen proportion
- Returns:
the width proportion of the screen
-
getVerticalMovement
float getVerticalMovement()
Set vertical offset
- Returns:
negative values offset upward, positive values offset downward, in dp. For example, to offset 20dp upward, return -20.
-
getHorizontalMovement
float getHorizontalMovement()
Set horizontal offset
- Returns:
negative values offset left, positive values offset right, in dp. For example, to offset 20dp left, return -20.
-
show
void show(FragmentManager manager)
-
onCreateView
@Nullable() View onCreateView(@NonNull() LayoutInflater inflater, @Nullable() ViewGroup container, @Nullable() Bundle savedInstanceState)
-
findView
abstract void findView()
-
initView
abstract void initView()
-
bindData
abstract void bindData()
-
getContentView
@LayoutRes() abstract int getContentView()
-
-
-
-