Live UIKit Android v1
Live UIKit Android
Live UIKit
Android
Version 1

Customize style

Copy link

You can customize the string and icon resources in the Live UIKit.


Customize using the style resource

Copy link

Each module has a customizable style resource. The style of a module encompasses the style of all components within the module. Refer to codes below to see how to customize the string resource and icon resource.

Note: The same customization method applies to all modules and components.

  1. Inherit the style of the module or component that you wish to customize and change the values.
<resources>
    <style name="CustomLiveEventOverlayView" parent="SendbirdLive">
        <item name="sb_widget_live_event_overlay_view">@style/custom</item>
    </style>

    <style name="custom" parent="Widget.SendbirdLive.LiveEventOverlayView">
        <item name="sb_live_event_notice_text_appearance"></item>
        <item name="sb_live_event_notice_background"></item>
        ...
    </style>
</resources>
  1. Set the custom module style when creating a fragment through the Builder class.
class CustomLiveEventActivity : AppCompatActivity() {
    ...

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.sb_live_activity)
        val args = intent?.extras ?: Bundle()
        val fragment = LiveEventHostFragment.Builder(liveEventId, R.style.CustomLiveEventOverlayView).build()
        supportFragmentManager.commit {
            replace(R.id.fragment_container_view, fragment)
        }
    }
}