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
FieldsModifier and TypeFieldDescriptionprotected android.widget.FrameLayoutprotected booleanIs used when deciding to handle orientation changes.protected android.view.Viewprotected OrientationManager.ForcedOrientationprotected booleanprotected intprotected InterstitialManagerprotected JsExecutorprotected android.view.Viewprotected android.view.Viewprotected WebViewBaseFields inherited from interface android.content.DialogInterface
BUTTON_NEGATIVE, BUTTON_NEUTRAL, BUTTON_POSITIVE, BUTTON1, BUTTON2, BUTTON3 -
Constructor Summary
ConstructorsConstructorDescriptionAdBaseDialog(android.content.Context context, InterstitialManager interstitialManager) AdBaseDialog(android.content.Context context, WebViewBase webViewBaseLocal, InterstitialManager interstitialManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected voidaddSoundView(boolean isMutedOnStart) voidcancel()voidchangeCloseViewVisibility(int visibility) ChangescloseViewvisibility.voidcleanup()protected android.view.ViewcreateSoundView(android.content.Context context) protected android.app.Activityandroid.view.Viewprotected abstract voidIs executed when the close button is clicked.protected abstract voidvoidprotected voidinit()protected voidprotected voidlockOrientation(int screenOrientation) protected voidvoidonWindowFocusChanged(boolean hasWindowFocus) protected voidpreInit()voidsetDialogListener(DialogEventListener listener) voidsetDisplayView(android.view.View displayView) protected voidMethods inherited from class android.app.Dialog
addContentView, closeOptionsMenu, create, dismiss, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, getActionBar, getContext, getCurrentFocus, getLayoutInflater, getOnBackInvokedDispatcher, 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, unregisterForContextMenuMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface android.view.Window.Callback
onPointerCaptureChanged, onProvideKeyboardShortcuts
-
Field Details
-
jsExecutor
-
interstitialManager
-
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
-
allowOrientationChange
protected boolean allowOrientationChangeIs used when deciding to handle orientation changes. Orientation changes allowed (true) by default. -
hasExpandProperties
protected boolean hasExpandProperties -
initialOrientation
protected int initialOrientation
-
-
Constructor Details
-
AdBaseDialog
-
AdBaseDialog
public AdBaseDialog(android.content.Context context, WebViewBase webViewBaseLocal, InterstitialManager interstitialManager)
-
-
Method Details
-
setDialogListener
-
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) ChangescloseViewvisibility. ifcloseViewis not defined - visibility is remembered and applied when closeView is added to container -
handleSetOrientationProperties
- 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)
-