Android 皮肤中未显示 Codenameone ComponentGroup
Codenameone ComponentGroup not displayed in Android skins
使用最新的 Codenameone 版本,我无法让 ComponentGroups 在 Android 上工作。
它们似乎在不同的 iOS 模拟器皮肤中运行良好,但在 Android 模拟器皮肤中却不行(例如:Galaxy S7)。
只是 运行 代码中的快速示例输出如下:
运行 在实际设备上,给出与在模拟器上完全相同的结果
根据记录,在主题常量中设置 ComponentGroupBool 似乎没有任何改变。
我也尝试使用默认的未更改主题,结果相同..
知道这可能是什么原因吗?
来自JavaDocs:
Important!!! A component group does nothing by default unless explicitly activated by the theme by enabling the ComponentGroupBool
constant (by default, this can be customized via the groupFlag
property). This allows logical grouping without changing the UI for
themes that don't need grouping.
因此主题常量中的 ComponentGroupBool
应该可以工作并为您提供这些 UIID。但是,它看起来不像 Android 中的上述图片,因为没有与 Android 中的样式相匹配的样式。
您也可以使用 group.setForceGroup(true)
.
强制显示组件组而不考虑 OS
使用最新的 Codenameone 版本,我无法让 ComponentGroups 在 Android 上工作。
它们似乎在不同的 iOS 模拟器皮肤中运行良好,但在 Android 模拟器皮肤中却不行(例如:Galaxy S7)。
只是 运行 代码中的快速示例输出如下:
运行 在实际设备上,给出与在模拟器上完全相同的结果
根据记录,在主题常量中设置 ComponentGroupBool 似乎没有任何改变。 我也尝试使用默认的未更改主题,结果相同..
知道这可能是什么原因吗?
来自JavaDocs:
Important!!! A component group does nothing by default unless explicitly activated by the theme by enabling the ComponentGroupBool constant (by default, this can be customized via the groupFlag property). This allows logical grouping without changing the UI for themes that don't need grouping.
因此主题常量中的 ComponentGroupBool
应该可以工作并为您提供这些 UIID。但是,它看起来不像 Android 中的上述图片,因为没有与 Android 中的样式相匹配的样式。
您也可以使用 group.setForceGroup(true)
.