vaadin / touchkit

TouchKit is a library of mobile components for Vaadin Framework
https://vaadin.com/touchkit
Other
11 stars 25 forks source link

GridLayout is not being updated on orientation change #421

Open vaadin-bot opened 8 years ago

vaadin-bot commented 8 years ago

Originally by draken


Using the code below, I've created a simple navigation view to be displayed inside a NavigationManager. It displays OK if the user keeps their device's orientation the same. However if the user changes the device orientation, the display is not updated, causing buttons and fields to sometimes disappear off the device. This seems odd as it doesn't happen on other screens, their layout updates to the screen orientation. This is using Vaadin 7.3.1 and Touchkit 4.0.0. I've attached screenshots of the issue

public class TestView extends NavigationView {

    public TestView(){
        Button leftButton = new Button();
        leftButton.setIcon(FontAwesome.CHEVRON_LEFT);
        leftButton.setWidth("45%");

        Button rightButton = new Button();
        rightButton.setIcon(FontAwesome.CHEVRON_RIGHT);
        rightButton.setWidth("45%");

        Label label = new Label("Test");
        label.setWidth("100%");

        GridLayout gridLayout = new GridLayout(2, 2);
        gridLayout.addComponent(label, 0,0,1,0);
        gridLayout.addComponent(leftButton, 0,1);
        gridLayout.addComponent(rightButton, 1,1);
        gridLayout.setComponentAlignment(rightButton, Alignment.TOP_RIGHT);
        gridLayout.setSizeFull();

        this.setContent(gridLayout);
    }
}

Imported from https://dev.vaadin.com/ issue #19708

vaadin-bot commented 8 years ago

Originally by draken


Attachment added: Screenshot_20160331-104517.png (60.8 KiB) Screenshot_20160331-104517.png https://trac-attachments.vaadin.com/trac/19708/Screenshot_20160331-104517.png Correct

vaadin-bot commented 8 years ago

Originally by draken


Attachment added: Screenshot_20160331-104524.png (62.1 KiB) Screenshot_20160331-104524.png https://trac-attachments.vaadin.com/trac/19708/Screenshot_20160331-104524.png Incorrect