Package com.castlabs.android.player
Class PlayerViewPlugin.SingleViewPlayerViewComponent<ViewType extends View>
java.lang.Object
com.castlabs.android.player.PlayerViewPlugin.SingleViewPlayerViewComponent<ViewType>
- Type Parameters:
ViewType- the type of the specific View
- All Implemented Interfaces:
PlayerViewPlugin.PlayerViewComponent
- Direct Known Subclasses:
SubtitlesViewComponent
- Enclosing interface:
PlayerViewPlugin
public abstract static class PlayerViewPlugin.SingleViewPlayerViewComponent<ViewType extends View>
extends Object
implements PlayerViewPlugin.PlayerViewComponent
Helper class which extracts all the common logic in a
PlayerViewPlugin.PlayerViewComponent in case
it only operates on one single View.-
Field Summary
Fields inherited from interface com.castlabs.android.player.PlayerViewPlugin.PlayerViewComponent
POSITION_DEBUG, POSITION_SUBTITLES, POSITION_THUMBNAILS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends View> attachToPlayerView(PlayerView playerView) Create any necessary Views, attach them to the given PlayerView and return them.getView()Returns the View that was created by this component.id()Returns the class that is used to identify this component when it is registered with the player view.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.castlabs.android.player.PlayerViewPlugin.PlayerViewComponent
getViewElevation
-
Constructor Details
-
SingleViewPlayerViewComponent
public SingleViewPlayerViewComponent()Default constructor for thePlayerViewPlugin.SingleViewPlayerViewComponent.
-
-
Method Details
-
id
Description copied from interface:PlayerViewPlugin.PlayerViewComponentReturns the class that is used to identify this component when it is registered with the player view. This is what you need to pass toPlayerView.getComponent(Class)to get the registered instance of this component.- Specified by:
idin interfacePlayerViewPlugin.PlayerViewComponent- Returns:
- The class that identifies this component.
-
attachToPlayerView
Description copied from interface:PlayerViewPlugin.PlayerViewComponentCreate any necessary Views, attach them to the given PlayerView and return them.- Specified by:
attachToPlayerViewin interfacePlayerViewPlugin.PlayerViewComponent- Parameters:
playerView- the PlayerView to which attach the views- Returns:
- The created Views.
-
getView
Returns the View that was created by this component.- Returns:
- the created View or null if it was not created yet
-