To Variant, Or Not to Variant

mmieher

Active Member
Licensed User
Longtime User
I have read many debates about whether or not to depart from the default variants, including these:
https://www.b4x.com/etp.html?vimeography_gallery=1&vimeography_video=254439386
https://www.b4x.com/android/forum/threads/showing-all-views-on-panel-in-designer.140859/#post-892415

I have ended up asking myself "What would Mr. Views do?" @Alexander Stolte
The answer seems to be "use the defaults". This is not Erel's first rodeo.

However, @klaus apparently has some secret project where he is exploring something else. The source alone is enough to peak my curiosity.

Common sense dictates that the population of devices has evolved since 2012, but maybe the OS (or whatever) is just really good at scaling everything?
 

mmieher

Active Member
Licensed User
Longtime User
"I have an application, not published, which covers 'small and big screens' but with some limitations."

Post #15 in the second link above.

I probably misunderstood, thinking you had a library for this.
 

klaus

Expert
Licensed User
Longtime User
Post #15 in the second link above.
The explanation is there.
I do not have any library for that.
I use different layout files for small and big screens with different panels.
On small screens only portrait and one panel per screen and on big screens only landscape and two panels per screen.
But all this depends on the kind of application and the data you want to display on the screen at the same time.
 

AnandGupta

Expert
Licensed User
Longtime User
But all this depends on the kind of application and the data you want to display on the screen at the same time.
This the thumb rule. And all are expected follow it to have good Android application UI.

I am developing app for showing account and inventory reports and set one variant of my phone size (to debug) and used anchors.
I know that my app will only be used in mobile phones 5 to 6/7 inches and never in pad. If requirement for pad comes, I will create different variant for it.
 

Cableguy

Expert
Licensed User
Longtime User
My two cents.. why only discuss resolution and leave 'scale ' out of the equation??
I mean... there are devices with same resolution, let's say 900×1080 but that have diferente native 'scale' ratios, resulting in different layout scalling, and very importantly, different font physical sizes, even if they have the same 'size' value!

This is something like discussing who came first, the chicken or the egg!
 

LucaMs

Expert
Licensed User
Longtime User
My two cents.. why only discuss resolution and leave 'scale ' out of the equation??
I mean... there are devices with same resolution, let's say 900×1080 but that have diferente native 'scale' ratios, resulting in different layout scalling, and very importantly, different font physical sizes, even if they have the same 'size' value!

This is something like discussing who came first, the chicken or the egg!
I think in dips. So, for example, a button in my opinion should be 45dips high.
[and the Designer has values expressed in dips]
 
Top