V2.20 will include the following new designer script keywords:
- Min and Max - same functionality as the equivalent standard keywords
Scaling keywords:
As explained in this thread: http://www.b4x.com/forum/basic4andr...ing-multiple-screens-tips-best-practices.html in most cases you will want to scale the views size and text size based on the device physical size. A naive solution for the size is to use percentage when specifying the dimensions. However the result is a "stretched" UI which in most cases looks bad on larger devices such as tablets.
The scaling method suggested in the above link can now be easily applied with the following three keywords:
- AutoScale - Scales a specific view (left, top, width, height and text size are scaled).
- AutoScaleAll - Scales all views
- AutoScaleRate - Sets the scaling rate (see the above link for more information)
Note that AutoScale methods implement the formula internally. It is no longer required to build it in the script.
The recommended way to adjust your UI is:
1. AutoScaleAll
2. Adjust the views location as required
3. Use SetLeftAndRight and SetTopAndBottom on the views that should fill the available space)
- Min and Max - same functionality as the equivalent standard keywords
Scaling keywords:
As explained in this thread: http://www.b4x.com/forum/basic4andr...ing-multiple-screens-tips-best-practices.html in most cases you will want to scale the views size and text size based on the device physical size. A naive solution for the size is to use percentage when specifying the dimensions. However the result is a "stretched" UI which in most cases looks bad on larger devices such as tablets.
The scaling method suggested in the above link can now be easily applied with the following three keywords:
- AutoScale - Scales a specific view (left, top, width, height and text size are scaled).
- AutoScaleAll - Scales all views
- AutoScaleRate - Sets the scaling rate (see the above link for more information)
Note that AutoScale methods implement the formula internally. It is no longer required to build it in the script.
The recommended way to adjust your UI is:
1. AutoScaleAll
2. Adjust the views location as required
3. Use SetLeftAndRight and SetTopAndBottom on the views that should fill the available space)