Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Detecting orientation?

Nicklas Karlsson
6 years ago Sep 29, 2016 5:56pm
Marcus Hellberg
6 years ago Sep 29, 2016 10:08pm

You could use Page.getCurrent().getWebBrowser() and check the height/width and change layouts accordingly. If you need to change stuff on the fly, register a window resize listener and redo the check there. 


Nick Rapellas
6 years ago Sep 30, 2016 1:49pm