Android Question Which variant is good for modern devices?

Since over 5 years, I've set the variant to 720 x 1232, scale = 1 (160 dpi)

And 720 x 1280 are software pixels of my tablet that has FHD (1080p) screen, which is also over 5 years old

I'm still using the same variant for my apps, and it's checked across Android 10 till Android 15 devices, and works

So, not sure if I have to update that, and what to use for nowadays devices?

Edit: I mean to use across phones, not just tablets, but used for all devices
 

Brian Dean

Well-Known Member
Licensed User
Longtime User
I am not sure what your problem is here. You should not be worrying about dpi and screen resolutions. Use the Designer and anchors. Usually that is sufficient but sometimes, if you want three equally sized buttons side by side for instance, you might need to add a Designer script and use %x or %y. If you have a complex layout with a large number of views then setting a larger variant makes it easier to fit the views inside the layout boundary, but if the variant that you are already using meets most requirements then there is no need to change it. If you are working with 720x1232 then I would think that is already quite large enough.

Sometimes using two layouts based on two variants, one for phones and one for tablets, say, might make the design easier but I don't think that is the motive for your question.
 
Upvote 0
I'm just trying to know if everything is alright with using this resolution. As I managed to get layout to fit on phones I tested on. But in some devices like Samsung, it hardly fits. In a device like Lenovo it fits perfectly. So, I was wondering if modern and current devices in market needs me changing that resolution by now. It's working otherwise and is usable till this point
 
Upvote 0

Brian Dean

Well-Known Member
Licensed User
Longtime User
But in some devices like Samsung, it hardly fits.

Now I am sure that you are not using all the features available in the Designer. You should not be concerned about tuning your Designer resolution to particular device sizes.

Here is a combined side-by-side image showing an app running on a Pixel 8a phone (2400 x 1080 - Android 16) and the same app on a six-year old Samsung Tab A tablet (1920 x 1200 - Android 11). Although the text does not scale perfectly the panels and labels do scale to fit exactly. The important point is that I am using the standard Designer variant of 320 x 480 - this is nowhere near either of the real device screen resolutions.



So, to answer your original question - "No - you do not have to change your variant size to cater for newer devices - as a rule you should use the default variant. If you need a very detailed layout with a large number of small views then, in that situation, increasing the variant size will make it easier to fit everything in."

If you want to discover how to design layouts using anchors then this post is a good place to start.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…