how to work with different dimension in android studio?

Posted on

Question :

I would like to tailor my application created for each mobile phone model.
As I some it gets with the smaller text on the screen and in others bigger, I would like to create a method where it suits the model of the mobile that the person is ..
that it is always the ideal size for that cell phone

I know what to do with ldpi, mdpi, xxhdpi, etc. But I do not know how to generate this file dimens.xml.


Answer :

Hello, one of the screen densities researched. link this link is from the documentation of the android itself and addresses this.

Just a short summary:
The android works with a dp unit other than an HTLM or CSS that uses px or%. Each screen has its specific density. Remember to save the images correctly that you will not have big problems.

I hope I have helped


Leave a Reply

Your email address will not be published. Required fields are marked *