Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Implement an API for responsive design

    Hello,

    Reading the site of www.cssgrid.net , I thought, wouldnt it be nice if we had a class, probably extending Layout, that does similar work (ie. compiles to something similar).

    Then, it would be working as responsive design. There might be some caveats when it comes to implementing this, but I thought it was a nice thing to have.

    The API might look something like:
    Code:
    ResponsiveGridLayout panel = new ResponsiveGridLayout(12); //ie. 12 columns, like on cssgrid.net
    panel.addRow(); //adds row with index 0
    panel.addMember(0, myWidget, ResponsiveGridColumn.THREE); //adds myWidget to row 0, with a width of THREE. 
    panel.addMember(0, myWidget2, ResponsiveGridColumn.THREE); //adds myWidget to row 0, with a width of THREE. 
    panel.addMember(0, myWidget3, ResponsiveGridColumn.THREE); //adds myWidget to row 0, with a width of THREE. 
    panel.addMember(0, myWidget4, ResponsiveGridColumn.THREE); //adds myWidget to row 0, with a width of THREE. 
    
    // the idea is that each element in the row adds up to 12 (=constructor parameter), 
    // here we have 4 columns of width 'THREE', making twelve.
    Responsive design is kind of growing as a technique (or whatever u wanna call it), making one design for mobile AND web.

    I wonder what your thoughts are, and would love to hear other ideas regarding this!

    #2
    We're already doing this, but at a much deeper level, eg a SplitPane that arranges a navigation, list and detail panes differently according to the device, similar to the iPhone Mail vs iPad Mail vs typical desktop mail interfaces (3 panes simultaneously visible).

    Comment


      #3
      Are there any examples of this / things to concern? Or is putting ur widgets in a splitpane enough?

      Comment


        #4
        No samples yet - we plan a set of samples around this demonstrating a few variations of what you refer to as "responsive design". But yes, putting widgets into a SplitPane is enough.

        Comment


          #5
          Alright, thanks I 'll try some of this out. Looking forward to examples :-) keep up the good work!

          Comment


            #6
            Hello!

            Just coming back at this, any idea when some splitpane examples will be put on-line?

            Another question: does it respond to browser size as well? Ie. changing the browser window size, will it change the layout accordingly? (for testing purposes this might be easier than having to deploy it first).

            Comment

            Working...
            X