一:不同的layout
android手机屏幕大小不一,有480x320, 640x360, 800x480.怎样才能让App自动适应不同的屏幕呢?
其实很简单,只需要在res目录下创建不同的layout文件夹,比如layout-640x360,layout-800x480,所有的layout文件在编译之后都会写入R.java里,而系统会根据屏幕的大小自己选择合适的layout进行使用。
二:hdpi、mdpi、ldpi ...
android模拟器屏幕大小和skin的对应
•320x480, portrait : emulator -skin HVGA-P (default)
•320x240, landscape: emulator -skin QVGA-L
•480x320, landscape: emulator -skin HVGA-L
•240x320, portrait : emulator -skin QVGA-P
•480*320,WQVGA432
•800*480 WVGA800
•800*540 WVGA854
android