Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android UI Design Idea [closed]

I have been working on android for the last 6 months. I wonder why UI Design is done in "dp"s. It would be great if its mentioned in "%" instead of dp's. What i meant to say is assuming total width and height of the screen to "100%" we can divide the width and height of the each widget. may be like this:

<ImageView android:layout_width="20%" android:layout_height="20%" />

So that every screen automatically takes it. Offcourse "wrap_content" and "fill_parent" can do. But cant use them to all views. I dont know if its possible or not.

like image 795
Seshu Vinay Avatar asked Mar 16 '26 14:03

Seshu Vinay


1 Answers

It's just the UI design aspect of Google that it's not possible to do what you intend to. That's 'cuz the layout height and width take integer values. However, layout weight takes decimal values in the form of percentage. So, in a way it's possible to do what you're trying to, but only with weight and not with height or width. +1 for the question.

like image 94
Ghost Avatar answered Mar 19 '26 04:03

Ghost



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!