Tool to convert dpi layout for different screen densities

Are there any tools that can convert inch units for a base density to another?

When I define my layout files I design for a 320x480dpi screen. But then it is not suitable for small and large devices.

But since we know the baseline dpi ldpi, mdpi, hdpi and xhdpi, why is there no tool that just used my width / height definitions in the files and scaled them to these different densities, given the default baseline. It then has to bring back the missing layout files where they will scale right at those other densities.

Seems straightforward and will save developers tons of time, does anyone know of an existing program to do this?


source to share

2 answers

I created a tool that allows you to scale / adjust layouts for tablets and devices with small screens and post a blog post here: to.html

Basically, defining your layouts in dp units isn't enough if you want your app to fit all devices and tablets, as there are four different "tight boxes". This tool will convert your layouts to fit these density buckets.

I hope the blog, tool and answer help others, I know it was good that my app works great on a tablet with a click of a button.



Your question doesn't make any sense. what you ask is exactly what Android does.

If you put an image in a folder (like xhdpi) it will automatically scale to all different device densities.

If you create a layout for a specific device class, the correct layout is used for the correct device.

I would advise not to design for specific screen resolutions - there are too many of them. Group screens in buckets - eg. "Phones" and "Tablets", "Small Phones", "Phones", "Large Screen Devices" - specify the criteria and build layouts for each category. It's a silly game to create layouts for every screen resolution, there are hundreds of android devices.



All Articles