What is the code or what is the simplest way (with explanation, because im a little bit confused) in making an android application automatically adjust it's screen size layout depending on the android device used?

Recommended Answers

All 5 Replies

Thanks for the reply.
What if i manually configured the size of a button just like for example 50dp x 50dp.. Is it possible for the program to automatically adjust the sizes of the Widgets?

@peter, i should say form widgets(i.e. Buttons, TextViews, etc.) and not Widgets literally.. Sorry for that misunderstanding..

No not possible once you give it fixed value. However you can use layout_weight to make device strech it dynamically. If you ever did any web development with CSS you should find many similarities.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.