📝 Description
Currently, KInAppBrowser cannot currently customize their behavior or appearance.
For example:
Android
Developers may want to configure options such as:
setShowTitle
setToolbarColor
setUrlBarHidingEnabled
setShareState
setInstantAppsEnabled
setCloseButtonIcon
iOS
Developers might want to customize:
preferredBarTintColor
preferredControlTintColor
entersReaderIfAvailable
dismissButtonStyle
modalPresentationStyle
💡 Proposed Solution
Introduce a cross-platform InAppBrowserOptions model that holds platform-specific configuration data.
Example API
data class InAppBrowserOptions(
val android: AndroidInAppBrowserOptions? = null,
val ios: IosInAppBrowserOptions? = null
)
data class AndroidInAppBrowserOptions(
val showTitle: Boolean = true,
val toolbarColor: Long? = null,
val shareState: ShareState = ShareState.SHARE_STATE_DEFAULT,
val enableUrlBarHiding: Boolean = false
)
data class IosInAppBrowserOptions(
val preferredBarTintColor: Long? = null,
val preferredControlTintColor: Long? = null,
val entersReaderIfAvailable: Boolean = false
)
📝 Description
Currently, KInAppBrowser cannot currently customize their behavior or appearance.
For example:
Android
Developers may want to configure options such as:
setShowTitlesetToolbarColorsetUrlBarHidingEnabledsetShareStatesetInstantAppsEnabledsetCloseButtonIconiOS
Developers might want to customize:
preferredBarTintColorpreferredControlTintColorentersReaderIfAvailabledismissButtonStylemodalPresentationStyle💡 Proposed Solution
Introduce a cross-platform
InAppBrowserOptionsmodel that holds platform-specific configuration data.Example API