Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customization of tabs bar of a nested Tabs Component causing trouble on iOS #3023

Closed
kutoman opened this issue Feb 11, 2020 · 2 comments
Closed
Assignees
Milestone

Comments

@kutoman
Copy link
Contributor

kutoman commented Feb 11, 2020

In my application there are several places where I use nested Tabs (in turn as child of Tabs). In some of those I customized the tabs bar in order to hide some tab buttons which point to tab pages which must not be selectable by button click. This was working whithout any problems for a long time. But somehow (I don't know when this started) the tabs bar isn't rendered properly on iOS anymore. The layout of the tabs bar is completely messed up only on iOS.

You can produce this by the following code:

        Form f = new Form("custom tabs", new BorderLayout());
        Tabs outerTabs = new Tabs();

        Tabs tabs = new Tabs();
        
        tabs.addTab("inner1", new Label("content1"));
        tabs.addTab("inner2", new Label("content2"));
        tabs.addTab("inner3", new Label("content3"));
        
        Container tabsCont = tabs.getTabsContainer();

        TableLayout newLayout = new TableLayout(1, 2);
        tabsCont.getComponentAt(0).setHidden(true);
        tabsCont.setLayout(newLayout);
        
        newLayout.addLayoutComponent(newLayout.cc(0,0).widthPercentage(50), tabsCont.getComponentAt(1), tabsCont);
        newLayout.addLayoutComponent(newLayout.cc(0,1).widthPercentage(50), tabsCont.getComponentAt(2), tabsCont);
        
        outerTabs.addTab("outer1", new Container());
        outerTabs.addTab("outer2", tabs);
        
        
        f.addComponent(BorderLayout.CENTER, outerTabs);
        f.show();

I would expect that the the first button among the tab buttons of the inner Tabs component is hidden and the other two buttons share the space of their parent equally. But on iOS the buttons are left-aligned and ignore the layout settings completely.

it looks like this (except for iOS):

Bildschirmfoto 2020-02-11 um 16 14 19

@codenameone codenameone added this to the Version 7.0 milestone Feb 12, 2020
@codenameone
Copy link
Collaborator

@shannah This looks like a safe region regression

@shannah
Copy link
Collaborator

shannah commented Feb 12, 2020

Fixed with 9fc2b4b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants