Class AdBaseDialog
- java.lang.Object
-
- android.app.Dialog
-
- org.prebid.mobile.rendering.interstitial.AdBaseDialog
-
- All Implemented Interfaces:
android.content.DialogInterface,android.view.KeyEvent.Callback,android.view.View.OnCreateContextMenuListener,android.view.Window.Callback
- Direct Known Subclasses:
AdExpandedDialog,AdInterstitialDialog,InterstitialVideo,VideoDialog
public abstract class AdBaseDialog extends android.app.Dialog
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface android.content.DialogInterface
android.content.DialogInterface.OnCancelListener, android.content.DialogInterface.OnClickListener, android.content.DialogInterface.OnDismissListener, android.content.DialogInterface.OnKeyListener, android.content.DialogInterface.OnMultiChoiceClickListener, android.content.DialogInterface.OnShowListener
-
-
Field Summary
Fields Modifier and Type Field Description protected android.widget.FrameLayoutadViewContainerprotected booleanallowOrientationChangeIs used when deciding to handle orientation changes.protected android.view.ViewdisplayViewprotected OrientationManager.ForcedOrientationforceOrientationprotected booleanhasExpandPropertiesprotected intinitialOrientationprotected InterstitialManagerinterstitialManagerprotected JsExecutorjsExecutorprotected android.view.ViewskipViewprotected android.view.ViewsoundViewprotected WebViewBasewebViewBase
-
Constructor Summary
Constructors Constructor Description AdBaseDialog(android.content.Context context, InterstitialManager interstitialManager)AdBaseDialog(android.content.Context context, WebViewBase webViewBaseLocal, InterstitialManager interstitialManager)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddCloseView()protected voidaddSkipView()protected voidaddSoundView(boolean isMutedOnStart)voidcancel()voidchangeCloseViewVisibility(int visibility)voidcleanup()protected android.view.ViewcreateSoundView(android.content.Context context)protected android.app.ActivitygetActivity()android.view.ViewgetDisplayView()protected abstract voidhandleCloseClick()Is executed when the close button is clicked.protected abstract voidhandleDialogShow()voidhandleSetOrientationProperties()protected voidinit()protected voidlockOrientation()protected voidlockOrientation(int screenOrientation)protected voidMraidContinue()voidonWindowFocusChanged(boolean hasWindowFocus)protected voidpreInit()voidsetDialogListener(DialogEventListener listener)voidsetDisplayView(android.view.View displayView)protected voidunApplyOrientation()-
Methods inherited from class android.app.Dialog
addContentView, closeOptionsMenu, create, dismiss, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, getActionBar, getContext, getCurrentFocus, getLayoutInflater, getOwnerActivity, getSearchEvent, getVolumeControlStream, getWindow, hide, invalidateOptionsMenu, isShowing, onActionModeFinished, onActionModeStarted, onAttachedToWindow, onBackPressed, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, 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, unregisterForContextMenu
-
-
-
-
Field Detail
-
jsExecutor
protected JsExecutor jsExecutor
-
interstitialManager
protected InterstitialManager interstitialManager
-
webViewBase
protected WebViewBase webViewBase
-
adViewContainer
protected android.widget.FrameLayout adViewContainer
-
displayView
protected android.view.View displayView
-
soundView
protected android.view.View soundView
-
skipView
protected android.view.View skipView
-
forceOrientation
protected OrientationManager.ForcedOrientation forceOrientation
-
allowOrientationChange
protected boolean allowOrientationChange
Is used when deciding to handle orientation changes. Orientation changes allowed (true) by default.
-
hasExpandProperties
protected boolean hasExpandProperties
-
initialOrientation
protected int initialOrientation
-
-
Constructor Detail
-
AdBaseDialog
public AdBaseDialog(android.content.Context context, InterstitialManager interstitialManager)
-
AdBaseDialog
public AdBaseDialog(android.content.Context context, WebViewBase webViewBaseLocal, InterstitialManager interstitialManager)
-
-
Method Detail
-
setDialogListener
public void setDialogListener(DialogEventListener listener)
-
onWindowFocusChanged
public void onWindowFocusChanged(boolean hasWindowFocus)
- Specified by:
onWindowFocusChangedin interfaceandroid.view.Window.Callback- Overrides:
onWindowFocusChangedin classandroid.app.Dialog
-
cancel
public void cancel()
- Specified by:
cancelin interfaceandroid.content.DialogInterface- Overrides:
cancelin classandroid.app.Dialog
-
getDisplayView
public android.view.View getDisplayView()
-
setDisplayView
public void setDisplayView(android.view.View displayView)
-
changeCloseViewVisibility
public void changeCloseViewVisibility(int visibility)
-
handleSetOrientationProperties
public void handleSetOrientationProperties() throws AdException- Throws:
AdException
-
cleanup
public void cleanup()
-
handleCloseClick
protected abstract void handleCloseClick()
Is executed when the close button is clicked. It is child job to handle the click
-
handleDialogShow
protected abstract void handleDialogShow()
-
preInit
protected void preInit()
-
init
protected void init()
-
MraidContinue
protected void MraidContinue()
-
lockOrientation
protected void lockOrientation()
-
lockOrientation
protected void lockOrientation(int screenOrientation)
-
unApplyOrientation
protected void unApplyOrientation()
-
getActivity
protected android.app.Activity getActivity()
-
addCloseView
protected void addCloseView()
-
addSkipView
protected void addSkipView()
-
addSoundView
protected void addSoundView(boolean isMutedOnStart)
-
createSoundView
protected android.view.View createSoundView(android.content.Context context)
-
-