代号一中的样式选项卡按钮

Style Tabs button in codename one

我需要设置选项卡按钮区域的样式。我正在使用 CSS 并且不知道如何设置该区域的 UIID,以便我可以设置它的样式。想将选项卡标题颜色更改为白色,并将同一选项卡按钮的内边距更改为白色。

这是我的代码

    Tabs homtabs = new Tabs();
    homtabs.setUIID("Tabs");

    homtabs.addTab("Tab 1", container1);
    homtabs.addTab("Tab 2", new SpanLabel("Some text directly in the tab"));
    homtabs.addTab("Tab 3", new SpanLabel("Some text directly in the tab"));
    homtabs.setTabPlacement(BOTTOM);
    homtabs.setSwipeActivated(false);
    homtabs.getContentPane().setUIID("TabsArea");

谢谢!

默认选项卡 UIID 是 "Tab",因此可以将颜色设置为白色。您还可以使用以下方法将其设置为其他内容:setTabUIID.

作为旁注 Android 选项卡有边框,因此您可能希望在设置样式时也覆盖它。