I’m required to maintain the same Height in Spinner and EditText views, but when moving to a smaller screen and having the width as “fill_parent” or “wrap_content” the view controll increases it’s height, so I tried to fix the height with 50dp (and 50dip) but the views just gets cut.
Some pics to illustrate my point
Second http://img218.imageshack.us/img218/6776/screenshot20110527at330.png How it should look (Bigger Screen)
Third http://img171.imageshack.us/img171/6776/screenshot20110527at330.png How it looks when fixed 50dp (Small Screen)
First http://img151.imageshack.us/img151/6776/screenshot20110527at330.png How it looks in with “fill_parent” & “wrap_content” property (smaller screen)
These are from emulator, right? Emulators don’t scale well on computer screen. Just use mm and know that the size can never be the same in the real world. You will have to get used to variable size. Reasons – different screen densities reported wrong from Android (phone). Even today you can never make equal sized text on computer screen. So, next time you’re asked to make an image X cm size, just laugh and ignore.
It will look OK, yes. But will not be the same size. The most important reason is that phone screen have different pixel densities that are reported wrong to Android and as a result the OS cannot scale properly.
See this thread:
Android: how to draw an ImageView with the same size regardless of device?