ods-android
ods-android copied to clipboard
Elevation of XML components is not taken into account
See OdsBottomNavigation XML demo for an example:
This is due to the fact that the Surface which contains the composable content in OdsAbstractComposeView clips its content to its bounds.
To fix this we could either:
- Add an elevation to the
Surfaceto mimic the bottom navigation elevation. This would mean adding anelevationparameter toOdsThemewhich is not the preferred solution. - Use
LocalContentColor(and maybe other composition locals) instead of aSurfaceinOdsThemeto propagate colors properly.
We also need to update the ViewDataBinding method in app:
AndroidView(
factory = {
binding.bind()
binding.executePendingBindings()
binding.root
},
update = {
binding.bind()
binding.executePendingBindings()
(binding.root as? ViewGroup)?.clipChildren = false
}
)