public class FlowplayerFragment
A simple way of adding Flowplayer in an application. This fragment is a wrapper around class FlowplayerView
and handles automatically lifecycle events and orientation changes.
It extends the deprecated native Fragment and it's therefore recommended that class FlowplayerSupportFragment
will be used instead. The latter extends the support library's Fragment.
Modifier and Type | Class and Description |
---|---|
static class |
FlowplayerFragment.Companion |
Modifier and Type | Field and Description |
---|---|
static FlowplayerFragment.Companion |
Companion |
Constructor and Description |
---|
FlowplayerFragment()
A simple way of adding Flowplayer in an application. This fragment is a wrapper around
class FlowplayerView and handles automatically lifecycle events and orientation changes.
It extends the deprecated native Fragment and it's therefore recommended that class FlowplayerSupportFragment will be used instead. The latter extends the support library's Fragment. |
Modifier and Type | Method and Description |
---|---|
FlowplayerView |
getPlayer()
Returns the instance of
class FlowplayerView that is used in this fragment. |
void |
onAttach(android.content.Context context) |
void |
onConfigurationChanged(android.content.res.Configuration newConfig) |
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState) |
void |
onDestroy() |
void |
onPause() |
void |
onResume() |
void |
onStart() |
void |
onStop() |
void |
setForceFullscreenOnLandscape(boolean forceFullscreenOnLandscape)
If set to true, the player will automatically enter fullscreen whenever the device is rotated to landscape and it will exit from fullscreen when the device is rotated to portrait.
This will also set
FlowplayerView.setFullscreenControlOrientation to true. |
public static FlowplayerFragment.Companion Companion
public FlowplayerFragment()
A simple way of adding Flowplayer in an application. This fragment is a wrapper around class FlowplayerView
and handles automatically lifecycle events and orientation changes.
It extends the deprecated native Fragment and it's therefore recommended that class FlowplayerSupportFragment
will be used instead. The latter extends the support library's Fragment.
@NotNull public FlowplayerView getPlayer()
Returns the instance of class FlowplayerView
that is used in this fragment.
class FlowplayerView
public void setForceFullscreenOnLandscape(boolean forceFullscreenOnLandscape)
If set to true, the player will automatically enter fullscreen whenever the device is rotated to landscape and it will exit from fullscreen when the device is rotated to portrait.
This will also set FlowplayerView.setFullscreenControlOrientation
to true.
forceFullscreenOnLandscape
- Whether or not to force fullscreen on landscape. The default value is true.FlowplayerView.setFullscreenControlOrientation
public void onAttach(@NotNull android.content.Context context)
@Nullable public android.view.View onCreateView(@NotNull android.view.LayoutInflater inflater, @Nullable android.view.ViewGroup container, @Nullable android.os.Bundle savedInstanceState)
public void onConfigurationChanged(@NotNull android.content.res.Configuration newConfig)
public void onStart()
public void onResume()
public void onPause()
public void onStop()
public void onDestroy()