PDA

View Full Version : Ext.layout.OBoxLayout



mitchellsimoens
24 Mar 2011, 1:05 PM
I like using HBoxLayout and VBoxLayout but when a person rotates their device, the components don't really take the best use of the screen. For example, if a person has their device in the landscape, HBoxLayout may be the best. Likewise, if the device is in portrait, VBoxLayout may be the best.

So I created a third BoxLayout called OBoxLayout. "O" stands for Orientation. What this will do is basically switch between HBoxLayout and VBoxLayout on orientation change. So now when a person rotates their device from landscape to portrait, it will go from HBoxLayout to VBoxLayout without removing anything.

This is configurable too. You can start it off at whatever orientation you would like and it will toggle between the two. You can also lock the changing.

GitHub: https://github.com/mitchellsimoens/Ext.layout.OBoxLayout
Demo: http://www.simoens.org/Ext.layout.OBoxLayout/

let me know what you think!

interfasys
13 Apr 2011, 8:36 AM
Great idea :)

Christian.Ploeger
22 May 2012, 3:51 AM
Hi Mitchell,

Really a great idea, is there a port of the OBoxLayout for Sencha Touch 2?

Thanks,
Chris

mitchellsimoens
22 May 2012, 4:17 AM
Hi Mitchell,

Really a great idea, is there a port of the OBoxLayout for Sencha Touch 2?

Thanks,
Chris

No there is not.