1)

In the UI design of Android application, to make your interface

scalable to any current and future type of display, you should use

the "sp" unit for text sizes and the "dip" unit for everything else.

You should also consider using vector graphics instead of bitmaps.

dp(density-independent pixels): an abstract unit based on the density

of the screen. On a display with 160 dots per inch, 1dp=1px.

dip: Synonym for dp, used more often in Google examples.

sp(scale-independent pixels): similar to dp but also scaled by the

user’s front size preference.

2)Landscape View

When user turn 90 degree of the moblie phone, may be the current layout

is not good for use.

So you can use alternate resources.

e.g. you can create a folder named res/layout-land/, and a file also

named main.xml which is the same with the file in the res/layout/ .

And you can define the main.xml file in the layout-land folder.

So we you turn round the phone, it will automatic to use this layout.

In the emulaor, ctrl+F11 is to swith to the landscape mode.

創作者介紹
創作者 shadow 的頭像
shadow

資訊園

shadow 發表在 痞客邦 留言(0) 人氣()