WYSIWYG isn't really WYSIWYG

bluedude

Well-Known Member
Licensed User
Longtime User
I didn't notice before because I always used controls arranged to the top of the screen but I now see that I simply cannot do WYSIWYG because it is impossible to get exact the same screen in the emulator on the desktop compared to the device.

I have all the correct settings (480x800, 240 dpi for Nexus One) but on my monitor there is much more space than on the device. That means I cannot simply drag and drop en design the UI, doesn't match when I publish it to my device.

Also tried with a Hero and creating the correct AVD but no luck either.

Does anyone know how to solve it? It drives me nuts and it keeps me from finishing an app.

I also tried to run with "Scale display to real size" but that does not start the emulator.

Arghhh...
 

bluedude

Well-Known Member
Licensed User
Longtime User
Emulator

What do you mean that there is much more space on the monitor than on the device?
Do you mean physical space (which is expected) or more pixels?

Well, if I look in my emulator for 480x800 I still see space where I can put UI elements but when I run that on my device it falls of the screen outside the screen.

So what is on screen does not match reality.

That makes it very hard to do 1:1 real design because the drawing canvas is different. Especially when you need to aline stuff at the bottom it is a pain.

Am i doing something wrong?
 
Upvote 0

bluedude

Well-Known Member
Licensed User
Longtime User
Actually, it is even more weird.

I have two activities in one project (a Splash startup activity). When I open that activity/layout in designer on the 480x800 it is fine. However, my main activity is totally different. There I sill have lots of design space available at the bottom but not on my device (Nexus One).
 
Upvote 0

hexitol

Member
Maybe this is of any relevance:

www.intomobile.com/2010/03/25/brief-google-nexus-one-screen-resolution-is-actually-392-x-653-not-480-x-800/
 
Upvote 0

bluedude

Well-Known Member
Licensed User
Longtime User
Not really, does not solve the emulator vs device difference. When designing on the emulator (480x800) I have much more space compared to the real device.

Is there a way to get the emulator exactly the size of the device so design becomes a little more easy?
 
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
I have all the correct settings (480x800, 240 dpi for Nexus One) but on my monitor there is much more space than on the device.

I had the same problem with an Archos 70:

The A70 has 800x480 res on a 7" screen. I created an 800x480 layout variant with 240dpi (1.5) and an emulator with an 800x480 skin and 240 hw.lcd.density. When displayed on a 7" emulator, it fits fine, but on the actual A70, it takes up little more than a quarter of the screen.

Erel said to put Msgbox(GetDeviceLayoutValues, "") into my code to verify my settings, and it told me "800x480, scale=1.0 (160 dpi)", so I changed the AVD and Designer settings to match, changed the layout to fit on the emulator, and when installled on the A70, it fit perfectly.

This may not be your problem, but it worked for me.
 
Upvote 0

Bob Katayama

Member
Licensed User
Longtime User
I had the same problem with an Archos 70:



Erel said to put Msgbox(GetDeviceLayoutValues, "") into my code to verify my settings, and it told me "800x480, scale=1.0 (160 dpi)", so I changed the AVD and Designer settings to match, changed the layout to fit on the emulator, and when installled on the A70, it fit perfectly.

This may not be your problem, but it worked for me.

So is this a problem I will run into when using just the emulator?
Will I have to take this into account down the road and write code to allow adjusting for various device screen resolutions for my apps?

Thanks

Bob
 
Upvote 0

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
Well, I think that part of my problem may have been that I only had done a layout for what I thought was my device's specs, so that's all the app had to work with, and the device didn't match.

But if you use the Designer to create layouts, then you don't have to "write code" for various screen sizes. You just drag and size layouts for the standard sizes and the app will use the one which most closely matches the specs of the device being used. That's my understanding, anyway.

The reason for putting the code in my app was to show me my device's screen specs was so that I could adjust them in Desginer, not so that I could adjust for the screen size in real time with code in the app.
 
Last edited:
Upvote 0
Top