public class FullScreenDialog
extends android.app.Dialog
| Modifier and Type | Class and Description |
|---|---|
static interface |
FullScreenDialog.OnDialogCloseListener
Interface close listener
|
android.content.DialogInterface.OnCancelListener, android.content.DialogInterface.OnClickListener, android.content.DialogInterface.OnDismissListener, android.content.DialogInterface.OnKeyListener, android.content.DialogInterface.OnMultiChoiceClickListener, android.content.DialogInterface.OnShowListener| Modifier and Type | Field and Description |
|---|---|
static int |
CLOSE_BTN_HEIGHT |
static int |
CLOSE_BTN_WIDTH |
| Constructor and Description |
|---|
FullScreenDialog(android.content.Context activityContext,
android.view.View view)
Constructs Full Screen dialog to present/show video/vast player
|
FullScreenDialog(android.content.Context activityContext,
android.webkit.WebView webView,
FullScreenDialog.OnDialogCloseListener closeListener)
Constructor to handle Expand Commands
|
| Modifier and Type | Method and Description |
|---|---|
void |
dismiss()
Method will gets called when the dialog gets dismissed
Dialog callback method used to clean up the dialog
|
android.widget.ImageView |
getCloseBtn() |
android.view.View |
getRootView()
Method is used to get Root view of the dialog View
Child at 0th position of Framelayouot
|
void |
lockOrientation(boolean lock)
Used to lock dialog orientation while showing dialog
If lock orientation is set to true then dialog will be locked with orientation provided at
show See
show(int).else allowed to honour any orientation
Default value is false. |
void |
onBackPressed()
Dialogs default callback to handle custom backpress
|
protected void |
onCreate(android.os.Bundle savedInstanceState)
Default onCreate of dialog to set dismiss listener and handle recreate of it
|
void |
onWindowFocusChanged(boolean hasFocus)
Dailog callback method to hide status bar when dialog has the focus
|
void |
setCloseButtonVisibility(boolean visibility)
To update close button Visibility, use this method
|
void |
setCloseListener(FullScreenDialog.OnDialogCloseListener closeListener)
Setter to get Full Screen Dialog close event
|
void |
setEnableBackPress(boolean enableBackPress)
Set flag to enable or disable device back press
if set to true, devices backpress get enabled
if set to false, devices backpress get disabled
Default enableBackPress has been set to true
|
void |
show(int orientation)
To show the dialog with orientation lock if lockOrientation is set to true
|
addContentView, cancel, closeOptionsMenu, create, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, getActionBar, getContext, getCurrentFocus, getLayoutInflater, getOwnerActivity, getSearchEvent, getVolumeControlStream, getWindow, hide, invalidateOptionsMenu, isShowing, onActionModeFinished, onActionModeStarted, onAttachedToWindow, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onDetachedFromWindow, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onMenuItemSelected, onMenuOpened, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPrepareOptionsMenu, onPreparePanel, onRestoreInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onStart, onStop, onTouchEvent, onTrackballEvent, onWindowAttributesChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, registerForContextMenu, requestWindowFeature, requireViewById, setCancelable, setCanceledOnTouchOutside, setCancelMessage, setContentView, setContentView, setContentView, setDismissMessage, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setOnCancelListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setOwnerActivity, setTitle, setTitle, setVolumeControlStream, show, takeKeyEvents, unregisterForContextMenupublic static final int CLOSE_BTN_WIDTH
public static final int CLOSE_BTN_HEIGHT
public FullScreenDialog(@NonNull
android.content.Context activityContext,
@NonNull
android.webkit.WebView webView,
@NonNull
FullScreenDialog.OnDialogCloseListener closeListener)
activityContext - the instance of activityContext to inflate FullScreenDialogwebView - instance of WebView which need to be shown inside dialogcloseListener - close listener to handle close eventspublic FullScreenDialog(@NonNull
android.content.Context activityContext,
@NonNull
android.view.View view)
activityContext - instance of activity context required to inflate dailogview - instance of view which need to be shown inside dialogpublic void lockOrientation(boolean lock)
show(int).else allowed to honour any orientation
Default value is false.lock - the lock of type booleanpublic void show(int orientation)
orientation - the orientation for the dialogpublic void setCloseListener(FullScreenDialog.OnDialogCloseListener closeListener)
closeListener - reference of OnDialogCloseListenerpublic void setEnableBackPress(boolean enableBackPress)
enableBackPress - boolean valuepublic void setCloseButtonVisibility(boolean visibility)
visibility - Set to true if you want visible on UI, set to false if notprotected void onCreate(android.os.Bundle savedInstanceState)
onCreate in class android.app.DialogsavedInstanceState - Saved instance objectpublic void onBackPressed()
onBackPressed in class android.app.Dialogpublic void dismiss()
dismiss in interface android.content.DialogInterfacedismiss in class android.app.Dialogpublic void onWindowFocusChanged(boolean hasFocus)
onWindowFocusChanged in interface android.view.Window.CallbackonWindowFocusChanged in class android.app.DialoghasFocus - boolean value true when dialog has the focus other falsepublic android.view.View getRootView()
public android.widget.ImageView getCloseBtn()