diff --git a/mobile/src/main/java/org/openhab/habdroid/ui/WidgetAdapter.kt b/mobile/src/main/java/org/openhab/habdroid/ui/WidgetAdapter.kt index 20c1178e54..089a6972ce 100644 --- a/mobile/src/main/java/org/openhab/habdroid/ui/WidgetAdapter.kt +++ b/mobile/src/main/java/org/openhab/habdroid/ui/WidgetAdapter.kt @@ -790,6 +790,12 @@ class WidgetAdapter( override fun bind(widget: Widget) { super.bind(widget) + + val showLabelAndIcon = widget.label.isNotEmpty() + && widget.labelSource == Widget.LabelSource.SitemapDefinition + labelView.isVisible = showLabelAndIcon + iconView.isVisible = showLabelAndIcon + val mappings = widget.mappings.filter { it.column != 0 && it.row != 0 } spareViews.addAll(table.children.filter { it is MaterialButton }) table.removeAllViews()