13.0-d20210426
Consider the example below. Even though i've set "setIsHandset()", and "setLinearOnMobile()" both to true, the form still renders multiple columns.
It works if i call "setLinearMode(true)", but i thought setLinearOnMobile would render linearly automatically (as per the docs) if on a handset. Am i missing something here?
Consider the example below. Even though i've set "setIsHandset()", and "setLinearOnMobile()" both to true, the form still renders multiple columns.
It works if i call "setLinearMode(true)", but i thought setLinearOnMobile would render linearly automatically (as per the docs) if on a handset. Am i missing something here?
Code:
@Override public void onModuleLoad() { Browser.setIsHandset(true);//i expect this to make the environment consider us in "mobile" mode. DynamicForm form = new DynamicForm(); form.setTitleOrientation(TitleOrientation.TOP); form.setWidth(800); form.setNumCols(2); form.setLinearOnMobile(true);// doesn't work //form.setLinearMode(true);//works TextItem item1 = new TextItem(); item1.setTitle("Item 1"); TextItem item2 = new TextItem(); item2.setTitle("Item 2"); TextItem item3 = new TextItem(); item3.setTitle("Item 3"); item3.setColSpan(2); form.setItems(item1, item2, item3); form.draw(); }
Comment