Looking for a way to build resolution independent layout xml?

by Avraham Serour » Fri, 06 Mar 2009 02:57:51 GMT


Sponsored Links
 build the interface without the xml, coding it, so each time you are going
to draw it check current resolution.
I worked with brew a few years back and some things we did that way, others
we just draw the button the same size in pixels, so the owner of the bigger
screen would see things smaller or had more unused screen area





--~--~---------~--~----~------------~-------~--~----~



Looking for a way to build resolution independent layout xml?

by Romain Guy » Fri, 06 Mar 2009 08:01:03 GMT


 No, that is NOT the correct way to do it.

The XML layout files contain everything you need to easily support
different screen densities. First of all, define all dimensions using
fill_parent/wrap_content or the dip unit. For instance, instead of
layout_width="10px" use "10dip". Also, you can create resource
directories that are configuration dependent: drawable-320x240/ or
drawable-120dpi/.

The current versions of Android (1.0 and 1.1) let you use these
features but they are not interpreted correctly. Cupcake however
correctly transforms the dip unit into pixels and lets you use the
XXXdpi resource directories.







-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Looking for a way to build resolution independent layout xml?

by Dianne Hackborn » Fri, 06 Mar 2009 08:12:38 GMT


 




But Cupcake does -not- introduce platform support for anything besides HVGA;
official support will be coming after Cupcake.  This is just another step on
the road to getting there.

Just to be clear. :)

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~



Looking for a way to build resolution independent layout xml?

by Dianne Hackborn » Fri, 06 Mar 2009 08:13:47 GMT


 Oh and it's probably worth saying, definitely before cupcake it just isn't
worth trying to run the emulator in anything besides the normal HVGA
resolution.  No other resolutions are supported, and trying to make them
work is really just going to be sending you off in the wrong direction
working around things in the platform that just aren't there.








-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~



Looking for a way to build resolution independent layout xml?

by Romain Guy » Fri, 06 Mar 2009 08:16:54 GMT


 Yes, that's correct I should have been clear about that, sorry.








-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. C2DM : SERVICE_NOT_AVAILABLE

Hi,

Yesterday i was developing an application with C2DM and my
registration was ok, I obtained a key :
APA91bHL5-
hShZFAMTNpQVwYXCxlvEPuXelUtpESrpFu96gbK-0dXC_5HLKk3h_mkoyHDr7ehudSb8ykx25NPdt7TApC2Cmd4w

It seems pretty good.
Unfortunately, today I try my application and i have an
error :SERVICE_NOT_AVAILABLE
My login (xxxx...@gmail.com) and my password are the same.

Eclipse error :
01-01 16:27:23.480: ERROR/C2DMRegistrar(2659): [C2DMReg] handleRequest
caught javax.net.ssl.SSLException: Not trusted server certificate

I don't understand why, someone can help me ?

Thx

-- 

2. [WTS]HTC Incredible S, Desire S, Defy 2nd, Motorola Milestone 2

permisi, mau numpang gelar lapak sbb :

Ready stock :

- Incridible S
- Desire S
- Defy 2nd 2unit
- Motorola Milestone 2

smua barang garansi singapore.. bisa di bantu untuk claim garansinya

yg minat  silakan japri :

Email : mony...@robotijo.org

thanks jalumnya :)


Best Regards
Adrie


-- Sent From My AndroidPhone With Sense UI --

-- 
"

3. Indosat tidak bisa tweeter

4. [WTS] Dell Strak BNIB 4.449jt

5. Intel Android Tablet Siap Meluncur!

6. Fragment Support forward compatibility?

7. Android kernel2.6.32 source code