java me - Can anyone give me examples for button and textViews in Android that will be according to "Supporting Multiple Screens"? -


i read http://developer.android.com/guide/practices/screens_support.html.com? couldn't how apply this, can give me example buttons , textview how fit on different devices?

it's not complicated might think. first remember basic layout designed mdpi, normal screen size with medium density (about 160 dpi).

so when design layout important part don't use px unit when define layout. instead use dp (density-independent pixel) unit automatically scaled correct number of px current density.

til moment have 1 file (e.g. mylayout.xml) different layout sizes (small, normal, large , xlarge). if think layout should different on device xlarge display, tablet create folder called layout-xlarge in same level layout , layout file named mylayout.xml. can make changes file let layout different on devices xlarge display. perhaps want larger text box you want rearrange button , text box.

so see, it's not hard. use dp unit dimensions , android rest you.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -