user1023177
user1023177

Reputation: 641

how to create universal UI design?

I would like to learn from experienced developers Android, as you develop a UI for different screens? For example, now I have this problem:

I have an element (TextView), which should be placed as nearly aligned to the left, but not back to back, but with a slight indentation. Accordingly, the bigger the screen, so this should become more padding. If it is set fixed (px / dp), as layout_marginLeft, it will remain so for all screens.

Or, like I have a button, which should take approximately the width of the percent of 60, while the remaining 40 percent are left blank. How can this be done without specifying a fixed size?

Is it possible to design a universal screen, which will stretch to compress the distance between the elements (as in my case), and do other similar things? Or is it necessary for each screen to create a resource directory and a separate design for each screen? How do you usually do that?

Thank you in advance for your reply, it is very important to me.

Upvotes: 2

Views: 850

Answers (1)

Reno
Reno

Reputation: 33792

Some tips :

Upvotes: 4

Related Questions