Head Fisrt Android Development读书笔记(4)Multiple Device Support

in apk webserver

add the mime type application/vnd.android.package-archive fro the .apk extension

 

portrait mode \ landscape mode intellij

android2.3.3 :

portrait:

landscape:

android 4.1 landscape:


(如果有人知道为什么不同的android版本在landscape上显示会不同的原因,请留言,谢谢)


landscape: res/layout-land/main.xml

small: res/layout-small.main.xml


 

Two properties that effect the way your application looks:

Screen size: the number of horizontal and vertical pixels on a screen.

Pixel Density:the abstracted number of pixels in an inch square.

 

different images for different pixel densities

hdpi: high pixel density (around 240 DPI)

mdpi: medium (around 160 DPI)

ldpi: low (around 120 DPI)

 

Real size is the whole reason for the pixel density groupings.

for 240 pixel width icon, will displayed for 1 inch in 240 pixel and 2 inch for 120 pixel

 

pixel demensions for launcher icons at each pixel density.

low: 36*36

medium: 48*48

high: 72*72


Set icon:

res/drawable-hdpi/icon.png

 <application android:label="@string/app_name" android:icon="@drawable/icon">

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值