Class MaximizingFullscreenHandler

  • All Implemented Interfaces:
    FullscreenHandler

    public class MaximizingFullscreenHandler
    extends DefaultFullscreenHandler
    A FullscreenHandler that works by setting the LayoutParams on the JWPlayerView to MATCH_PARENT. This FullscreenHandler could be used as an alternative to the DefaultFullscreenHandler.

    Note that this FullscreenHandler may not work correctly in every layout situation.

    • Constructor Detail

      • MaximizingFullscreenHandler

        public MaximizingFullscreenHandler​(android.app.Activity activity,
                                           JWPlayerView jwPlayerView)
        Constructs a new DefaultFullscreenHandler.
        Parameters:
        activity - the activity containing the instance of the JWPlayerView that this FullscreenHandler will be attached too.
        jwPlayerView - the JWPlayerView that will be attached to this fullscreen handler.
    • Method Detail

      • doLayoutChanges

        protected void doLayoutChanges​(boolean fullscreen)
        Perform the layout changes necessary to make the player fill the screen.
        Overrides:
        doLayoutChanges in class DefaultFullscreenHandler
        Parameters:
        fullscreen - True when entering fullscreen.
      • updateLayoutParams

        public void updateLayoutParams​(android.view.ViewGroup.LayoutParams layoutParams)
        Called by the JWPlayerView when it's LayoutParameters have been updated. Use these layout parameters when returning from fullscreen.
        Specified by:
        updateLayoutParams in interface FullscreenHandler
        Overrides:
        updateLayoutParams in class DefaultFullscreenHandler
        Parameters:
        layoutParams - the new Layout Parameters for the JWPlayerView.
      • fullscreenLayoutParams

        protected static android.view.ViewGroup.LayoutParams fullscreenLayoutParams​(android.view.ViewGroup.LayoutParams srcParams)
        Creates a clone of srcParams with the width and height set to MATCH_PARENT.
        Parameters:
        srcParams -
        Returns:
        LayoutParams in fullscreen.