UI Customization
By fully customizing your native Android player UI using the Android Player SDK, you can create a unique and seamless playback experience for your users.
Step 1. Hide the official UI and build a custom UI to overlay.
Follow the provided sample codes to disable the official UI and overlay a custom one:
- Android
- Android TV
/**
* Integrate with UniView
*/
// Xml file
<com.blendvision.player.playback.presentation.UniView
...
app:disableControlPanel="true" />
/**
* overlay your own control panel on UniView
*/
<xxxx.CustomizeControlPanel
... />
- Can also hide the official UI with below API
binding.playerView.setupControlPanel(
...
disableControlPanel = true
)
/**
* Integrate with UniTvFragment
*/
// Xml file
<fragment
android:id="@+id/uni_tv_fragment"
android:name="com.blendvision.player.playback.presentation.UniTvFragment"
... />
<fragment
android:id="@+id/custom_tv_fragment"
android:name="xxxx.CustomTvFragment"
... />
// Kotlin file
vali uniTvFragment = supportFragmentManager.findFragmentById(R.id.uni_tv_fragment) as UniTvFragment
uniTvFragment.setup(uniPlayer, true)
Step 2: Control the player with customized UI Components
When clicked the custom UI, use the provided APIs to control the player behavior.