Class 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
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addCloseView()  
      protected void addSkipView()  
      protected void addSoundView​(boolean isMutedOnStart)  
      void cancel()  
      void changeCloseViewVisibility​(int visibility)
      Changes closeView visibility.
      void cleanup()  
      protected android.view.View createSoundView​(android.content.Context context)  
      protected android.app.Activity getActivity()  
      android.view.View getDisplayView()  
      protected abstract void handleCloseClick()
      Is executed when the close button is clicked.
      protected abstract void handleDialogShow()  
      void handleSetOrientationProperties()  
      protected void init()  
      protected void lockOrientation()  
      protected void lockOrientation​(int screenOrientation)  
      protected void MraidContinue()  
      void onWindowFocusChanged​(boolean hasWindowFocus)  
      protected void preInit()  
      void setDialogListener​(DialogEventListener listener)  
      void setDisplayView​(android.view.View displayView)  
      protected void unApplyOrientation()  
      • Methods 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, unregisterForContextMenu
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface android.view.Window.Callback

        onPointerCaptureChanged, onProvideKeyboardShortcuts
    • Field Detail

      • adViewContainer

        protected android.widget.FrameLayout adViewContainer
      • displayView

        protected android.view.View displayView
      • soundView

        protected android.view.View soundView
      • skipView

        protected android.view.View skipView
      • 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)
    • Method Detail

      • onWindowFocusChanged

        public void onWindowFocusChanged​(boolean hasWindowFocus)
        Specified by:
        onWindowFocusChanged in interface android.view.Window.Callback
        Overrides:
        onWindowFocusChanged in class android.app.Dialog
      • cancel

        public void cancel()
        Specified by:
        cancel in interface android.content.DialogInterface
        Overrides:
        cancel in class android.app.Dialog
      • getDisplayView

        public android.view.View getDisplayView()
      • setDisplayView

        public void setDisplayView​(android.view.View displayView)
      • changeCloseViewVisibility

        public void changeCloseViewVisibility​(int visibility)
        Changes closeView visibility. if closeView is not defined - visibility is remembered and applied when closeView is added to container
      • 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)