Custom Menu Items
Add custom menu items to the StreamLayer Element on Android. Use SLRCustomOverlay to register custom fragments in the StreamLayer menu with configurable position and visibility.
Custom Menu Items
You can add custom menu items to the StreamLayer Element on Android. Use the SLRCustomOverlay class to register your custom fragments. The class properties are:
actionId— navigation destination IDtitleId— string resource for the button titleiconId— drawable resource for the button imagefullClassName— full class name of the Fragment class (e.g.,"io.streamlayer.demo.MainFragment")
Optionally, set the position in the bottom menu or hide the item using SLRCustomOverlay.position(Int) and SLRCustomOverlay.showOnBottomMenu(Boolean).
Register custom menu items through StreamLayer.addCustomOverlays():
StreamLayer.addCustomOverlays(arrayOf(
SLRCustomOverlay(
R.id.action_public_chat,
R.string.public_chat,
R.drawable.ic_public_chat,
MainFragment::class.qualifiedName)
.showOnBottomMenu(true)
.position(3)
)
)Related
- Custom Notifications Guide — Custom in-app notifications
- UI Options Guide — Comprehensive
SLRAppHostconfiguration reference
Updated 21 days ago
