public abstract class CommonDialogFragment extends BaseDialogFragment implements Core.BaseDialog
CommonDialogFragment
is the base class for other dialogs.AlertDialogFragment
,
ProgressDialogFragment
Fragment.InstantiationException, Fragment.SavedState
Modifier and Type | Field and Description |
---|---|
static String |
ARG_PARENT
The name of the entry in the bundle from which to retrieve the parent fragment reference.
|
protected static String |
ARG_TEXT
The name of the entry in the bundle from which to retrieve the text of the dialog message.
|
protected static String |
ARG_THEME
The name of the entry in the bundle from which to retrieve the dialog's theme.
|
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
Constructor and Description |
---|
CommonDialogFragment()
Initialises a newly created
CommonDialogFragment object. |
Modifier and Type | Method and Description |
---|---|
void |
dismiss()
Please refer to the base method description.
|
CommonDialogFragment |
setTheme(int themeResId)
Sets the dialog's theme.
|
boolean |
start(Activity context,
String text,
Intent data)
Please refer to the base method description.
|
protected abstract boolean |
startDialog(Intent data)
Starts dialog.
|
boolean |
stop()
Please refer to the base method description.
|
protected abstract boolean |
stopDialog()
Stops dialog.
|
getDebugLevel, getDebugMessage, onActivityCreated, onActivityResult, onAttach, onAttach, onCancel, onConfigurationChanged, onCreate, onCreateDialog, onCreateView, onDestroy, onDestroyView, onDetach, onDismiss, onInflate, onInflate, onInflate, onLowMemory, onPause, onRequestPermissionsResult, onResume, onSaveInstanceState, onStart, onStop, onTrimMemory, onViewCreated, onViewStateRestored, setRetainInstance, setTargetFragment
dismissAllowingStateLoss, dump, getDialog, getShowsDialog, getTheme, isCancelable, setCancelable, setShowsDialog, setStyle, show, show
equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isVisible, onAttachFragment, onContextItemSelected, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onHiddenChanged, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPrepareOptionsMenu, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, toString, unregisterForContextMenu
public static final String ARG_PARENT
protected static final String ARG_TEXT
protected static final String ARG_THEME
public CommonDialogFragment()
CommonDialogFragment
object.public CommonDialogFragment setTheme(int themeResId)
themeResId
- The resource ID of the themeCommonDialogFragment
objectpublic boolean start(Activity context, String text, Intent data)
start
in interface Core.BaseDialog
context
- The Activitytext
- The text to displaydata
- The additional data to send to Activity.onActivityResult()
true
if dialog was started successfully, false
otherwiseprotected abstract boolean startDialog(Intent data)
true
if dialog was started successfully, false
otherwisepublic boolean stop()
stop
in interface Core.BaseDialog
true
if dialog was stopped successfully, false
otherwiseprotected abstract boolean stopDialog()
true
if dialog was stopped successfully, false
otherwisepublic void dismiss()
dismiss
in class DialogFragment
Copyright © 2015-2017 akha, a.k.a. Alexander Kharitonov
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.