[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] Perspective Layout


I'm trying to create a perspective wit n views arranged horizontally, each view _same_ horizontal size. I did not understand the API documentation:
 * @param ratio the amount of space donated to the new part, in the range
 *        <code>0.05f</code> to <code>0.95f</code>; values outside this range

To which view/space is this ratio related? Can I only control one dimension?

Having 4 views I tried the following approach which does not give the desired result (it is more or less what I want but horizontal sizes are not equal).

Assuming ratio is per page
        layout.addView(VIEW_A_ID, IPageLayout.TOP,   (float)0.25, IPageLayout.ID_EDITOR_AREA);
        layout.addView(VIEW_B_ID, IPageLayout.RIGHT, (float)0.25, VIEW_A_ID);
        layout.addView(VIEW_C_ID, IPageLayout.RIGHT, (float)0.25, VIEW_B_ID);
        layout.addView(VIEW_D_ID, IPageLayout.RIGHT, (float)0.25, VIEW_C_ID);

Dani