Class APSMediaPlayerClosableOverlayController
java.lang.Object
com.appscend.overlaycontrollers.APSMediaPlayerOverlayController
com.appscend.overlaycontrollers.APSMediaPlayerClosableOverlayController
- All Implemented Interfaces:
KRAdapter
- Direct Known Subclasses:
APSMediaPlayerHTMLOverlayController, APSMediaPlayerImageOverlayController
The APSMediaPlayerClosableOverlayController class is meant to be a superclass for overlay controllers that need to display a configurable close button to remove the overlay from screen.
The class adds a set of standard keys to any overlay controller's own defined keys, to handle close button configuration. Methods are also exposed to allow a subclass to add and remove the close button from its view stack.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringthe background color of the close button view.static final Stringa Number indicating the opacity of the close button after it has been activated for receiving taps.static final Stringset this key to @YES to skip displaying the close button for this overlay.static final Stringif set to a UIImage, that image will be used instead of the standard progress-wheel close button.static final Stringa Number indicating the opacity of the close button before it is activated for receiving taps.static final Stringa Number that indicates the offset, in seconds, after which the close button should become activated for receiving taps.static final Stringthe horizontal offset of the close button, relative to the right margin of the overlay's view.static final Stringthe vertical offset of the close button, relative to the top margin of the overlay's view.static final Stringthe color of the circular bar that indicates the currently elapsed time until the close button can be tapped.static final Stringthe color of the circular bar that indicates the total time until the close button can be tapped.static final Stringa Number representing the length of a side of the close button square, in points.static final Stringa Array of URLs that will be tracked by the player when the close button is tapped and the overlay is removed (see [APSMediaPlayer track:forEvent:type:]).static final Stringthe color of the X symbol in the center of the player.Fields inherited from class APSMediaPlayerOverlayController
overlay -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddViewToContainer(android.view.ViewGroup viewGroup) floatgetAlpha()android.view.ViewgetView()voidvoidload(android.content.Context context) Builds the overlay's view.voidThis method removes the close button from the current view stack.type()Methods inherited from class APSMediaPlayerOverlayController
refreshModifier and TypeMethodDescriptionvoidrefresh(android.content.Context context, android.view.ViewGroup viewGroup)
-
Field Details
-
kAPSCloseImage
if set to a UIImage, that image will be used instead of the standard progress-wheel close button.- See Also:
-
kAPSCloseSize
a Number representing the length of a side of the close button square, in points. Defaults to 16.- See Also:
-
kAPSCloseBackgroundColor
the background color of the close button view. Set this to a Color or a String containing the hex color representation. Defaults to [Color clearColor].- See Also:
-
kAPSCloseXColor
the color of the X symbol in the center of the player. Set this to a String containing the hex color representation. Defaults to [Color darkGrayColor].- See Also:
-
kAPSCloseProgressColor
the color of the circular bar that indicates the currently elapsed time until the close button can be tapped. Set this to a String containing the hex color reprezentation. Defaults to [Color darkGrayColor].- See Also:
-
kAPSCloseProgressTrackColor
the color of the circular bar that indicates the total time until the close button can be tapped. Set this to a NString containing the hex color reprezentation. Defaults to [Color lightGrayColor].- See Also:
-
kAPSCloseOffsetX
the horizontal offset of the close button, relative to the right margin of the overlay's view. Set this to a Number. Defaults to 0.- See Also:
-
kAPSCloseOffsetY
the vertical offset of the close button, relative to the top margin of the overlay's view. Set this to a Number. Defaults to 0.- See Also:
-
kAPSCloseInitialAlpha
a Number indicating the opacity of the close button before it is activated for receiving taps. Defaults to 0.5.- See Also:
-
kAPSCloseFinalAlpha
a Number indicating the opacity of the close button after it has been activated for receiving taps. Defaults to 0.7.- See Also:
-
kAPSCloseHidden
set this key to @YES to skip displaying the close button for this overlay. Defaults to @NO.- See Also:
-
kAPSCloseOffset
a Number that indicates the offset, in seconds, after which the close button should become activated for receiving taps. Defaults to 3.- See Also:
-
kAPSCloseTrackingURLs
a Array of URLs that will be tracked by the player when the close button is tapped and the overlay is removed (see [APSMediaPlayer track:forEvent:type:]).- See Also:
-
-
Constructor Details
-
APSMediaPlayerClosableOverlayController
public APSMediaPlayerClosableOverlayController()
-
-
Method Details
-
removeCloseButton
public void removeCloseButton()This method removes the close button from the current view stack. -
activateButton
public void activateButton() -
getAlpha
public float getAlpha()- Specified by:
getAlphain classAPSMediaPlayerOverlayController
-
type
-
load
public void load(android.content.Context context) Description copied from class:APSMediaPlayerOverlayControllerBuilds the overlay's view. When the Activity is recreated the player moves this view to the new one unchanged, so the view must not keep a reference to the Activity it was built with.- Specified by:
loadin classAPSMediaPlayerOverlayController
-
addViewToContainer
public void addViewToContainer(android.view.ViewGroup viewGroup) - Specified by:
addViewToContainerin classAPSMediaPlayerOverlayController
-
getView
public android.view.View getView()- Specified by:
getViewin classAPSMediaPlayerOverlayController
-
hideOverlay
public void hideOverlay()- Specified by:
hideOverlayin classAPSMediaPlayerOverlayController
-