SlideShare a Scribd company logo
1 of 75
Download to read offline
Android DevCamp


Produced by CSDN



Website:

http://devcamp.csdn.net/

Weibo:

http://weibo.com/cmdnclub/
Supporting Multiple Screens in
                      Android
                 Android多屏幕适配
Preface
}    Author:
      }    Ren Fei. Android developer
      }    Buding Mobile     /      Innovation Works



}    Announcement:
      }    本slide内容全部来自互联网,以及我自己的⼀一点臆想,如
            有错误,欢迎随便指出。
Origin of the problem


              问题的由来
Fragmentation
}    上千种android设备。
      }    不同的平台版本。
      }    不同的屏幕尺寸、分辨率。
      }    不同的输入方式。
Platform version
}    From v1.5 to v4.1.
}    8 main version. 14 sub version.
Screen sizes
}    2.6" HTC G16
}    3.2" 3.7" HTC G5/G7
}    4.0" 4.3" Samsung i9000/9100
}    7.0" 7.7" 8.9" Samsung Galaxy Tab
}    10.1" Moto Xoom
}    …..
Screen Resolution iPhone
}    iPhone
      }    320*480
      }    640*960


}    iPad
      }    1024*768
      }    2048*1536
Screen Resolution Android
}    QVGA    240*320
}    WQVGA   240*400
}    HVGA    320*480
}    WVGA    480*800
}    FWVGA   480*854
}    SVGA    600*800
}    DVGA    960*640
}    WSVGA   1024*600
}    WXGA    1280*768
}    qHD     540*960
}    HD      1280*720
}    ……
Screen RES. iPhone vs. Android
Android System Support

             Android系统支持
What does android do ?
Some definition
}    Screen resolution
      }    480*800
}    Screen size
      }    3.7"
}    Screen density
      }    252dpi


}    DPI(dots per inch), xdpi, ydpi
      }    DPI= RES. / SIZE
}    DIP (Density-independent pixel)
      }    px = dp * (dpi / 160)
Generalized SIZE/DPI
}    G.DPI:    hdpi/mdpi/ldpi/xhdpi
}    G.SIZE:   small/normal/large/xlarge
Generalized DPI definition

        G.DPI                DPI      1 DP = ? px

   ldpi (Low density)       120 dpi      0.75

 mdpi (Medium density)      160 dpi       1

   hdpi (High density)      240 dpi       1.5

xhdpi(Extra-high density)   320 dpi       2
Generalized SIZE definition

               G.SIZE                Qualifier(at least)
                xlarge                 960dp x 720dp
                 large                 640dp x 480dp
                normal                 470dp x 320dp
                small                  426dp x 320dp


}    Android does not currently support screens smaller than
      small screens.
Relationships
}    RES. + SIZE à DPI
       }    DPI = RES. / SIZE
}    DPI à G.DPI
      }     ?
}    SIZE à G.SIZE
      }     ?
Some model
   device       SIZE      G.SIZE    DPI     G.DPI   RES. px     RES. dp

 HTC wildfire   2.8 in     small   140dpi    ldpi   240*320    320*428dp

  HTC hero      3.2 in    normal   180dpi   mdpi    320*480    320*480dp

 HTC desire     3.7 in    normal   252dpi   hdpi    480*800    320*533dp

 Dell Streak    5.0 in     large   186dp    mdpi    480*800    480*800dp

HTC sensation   4.3 in    normal   256dpi   hdpi    540*960    360*640dp

 Galaxy note    5.3 in    normal   280dpi   xhdpi   800*1280   400*640dp

  HTC Flyer     7.0 in     large   170dpi   mdpi    600*1024   600*1024dp

 Galaxy tab     7.0 in    normal   170dpi   hdpi    600*1024   400*682dp

    Xoom        10.1 in   xlarge   150dpi   mdpi    800*1280   800*1280dp
DPI à G.DPI
}    G.DPI 大部分等于真实DPI最临近的G.DPI。
      }    如果DPI正好在两个G.DPI正中间怎么办?


}    G.DPI可能和DPI相差很多。
      }    Samsung galaxy tab


}    G.DPI是由手机厂商定义的。
      }    选择标准是使新的设备能最好的适用于现有app。
SIZE à G.SIZE
}    SIZE 和 G.SIZE 并没有很明显的关系。

}    G.SIZE是由RES.(dp) 定义的。
      }    参考G.SIZE的下界限定。


}    RES.(px) + G.DPI à RES.(dp) à G.SIZE
Relationships
}    RES. + SIZE à DPI

}    DPI à G.DPI (mostly)

}    G.DPI + RES. à G.SIZE
Effect of G.DPI
}    Developers do not need to care about real density.

}    RES.(px). are aggregated to RES.(dp).
      }    RES.(dp) has a much smaller range.
                  device       G.SIZE   G.DPI   RES. px    RES. dp

                HTC wildfire    small    ldpi    240*320   320*428dp

                 HTC hero      normal   mdpi     320*480   320*480dp

                HTC desire     normal   hdpi     480*800   320*533dp

               HTC sensation   normal   hdpi     540*960   360*640dp

                Galaxy note    normal   xhdpi   800*1280   400*640dp

                Galaxy tab     normal   hdpi    600*1024   400*682dp
Density independence
}    根据G.DPI,系统将dp units和drawables换算调整为适
      配设备的大小(px).

}    A Button (100*100dp) and a icon (48px*48px in mdpi)




}    Go back to see first demo.
Support general handset

             如何支持普通手机?
Handset features
}    Small and Normal devices take over 90%.
}    These devices are nearly all handsets.
Handset qualifier
}    G.SIZE: small/normal
}    Default Orientation: portrait
}    RES.(dp): 426dp x 320dp - 640dp x 480dp.
How to support?
}    Develop a scalable app.
      }    Use wrap_content, fill_parent.
      }    Use dp not px.
      }    Use LinearLayout/RelativeLayout, not AbsoluteLayout.
      }    Provide different drawables for different dpi.
      }    Use more 9-patch drawable.
      }    …
A simple demo
                                                   720*1280px xhdpi
                                  540*960px hdpi
                 480*800px hdpi
320*480px mdpi
Support more devices
   (handset & tablet)

        如何支持更多的设备?
The first guideline
}    Develop one app for all devices.
      }    Tablets和Handsets没有明显的界限。
      }    为不同的设备、分辨率开发不同的app耗费巨大且效果不佳。


}    Anti-example:
Official Guidelines
}    Build your activity designs based on fragments
}    Use the action bar
}    Implement flexible layouts
Implement flexible layouts
}    How to implement flexible layouts in one app?
      }    Official answer: Think like a web designer.
Responsive web design
}    Build something that works on any possible width or
      device instead of something that works on all current
      widths and devices.
      }    与其为当前所有设备、大小做支持,不如去支持所有可能
            出现的情况。


}    Use css3 media queries.

}    Usually combine with fluid web design.
Media queries
}    Sample:
      }    <link media="screen and (max-device-width: 800px)"
            href=“common.css" />


}    Media queries contain two components:
      }    A media type. (screen, print)
      }    A media feature(max-device-width) and query value(800px).


}    Use media queries to filter css depend on device info.
Website demo
}  http://www.alistapart.com/d/responsive-web-design/ex/ex-
    site-FINAL.html
}  3 media queries divide width to 4 part.


}    @media (max-width: 400px)
}    @media (max-width: 600px)
}    @media (min-width: 1300px)

}    Web Gallery
Responsive mobile design
}    Same content, same logical, but different representation.
      }    同样的内容,同样的逻辑,不同的展示方式。


}    Use configuration qualifiers to provide different layout for
      different devices.
Configuration qualifiers
}    Screen Size:
      }    small/normal/large/xlarge
}    Density:
      }    ldpi/mdpi/hdpi/xhdpi…
}    Orientation:
      }    port/land
}    Platform version:
      }    v3/v4/v11/v13…
}    Language:
      }    en/fr…
New screen size qualifiers
}    Smallest Width
      }    sw600dp
}    Available Width
      }    w600dp
}    Available height
      }    h600dp
Web design vs Android design
}    CSS vs Layout

}    CSS pixel vs Dip
}    Ems vs Sp
}    CSS3 media query vs Configuration qualifiers

}    Fluid web design vs Scalable design
}    Responsive web design vs Responsive mobile design
App demos
}    IOSched2011
}    IOSched2012
}    Google Play
IOSched2011
}    3 fragments
}    4 layouts
IOSched2011
}    layout/   layout-land/
IOSched2011
}    layout-xlarge-land-v11/   layout-xlarge-v11
IOSched2012
}    4 fragments
}    4 layouts
IOSched2012
IOSched2012
}    layout/




}    layout-land/
IOSched2012
}    layout-large-v11/   layout-large-land-v11/
Google Play
}    Version: 3.4.4
}    4 layouts
}    generic_details.xml
Google Play
}    layout/   layout-land/
Google Play
}    layout-w600dp-h540dp/   layout-w800dp-h540dp/
UI Design Patterns

           UI设计模式
Android UI design patterns
}    Design pattern
      }    对于⼀一些普遍出现的问题的通用解决方法。


}    成熟的UI patterns能在不同的设备环境下自我调节。

}    Here we introduce some useful patterns.
      }    Action Bar
      }    Workspace
      }    Dashboard
      }    Slide navigation
Action Bar
}    Replace the old TitleBar.
}    Many functions:
      }    Menu
      }    Search
      }    Navigation
            }    Tab
            }    Spinner
            }    Up
      }    Action Mode
      }    Split Action Bar
Action Bar
}    Navigation(Tab)
Action Bar
}    Navigation(Spinner)/Split Action Bar/Action Mode
Action Bar
Workspace
}    A scrollable TabView.
}    Could combine with ActionBar.
Workspace
Dashboard
}    Acted as the landing page and holds all main functions.
Dashboard
Slide navigation
}    Could replace the Dashboard.
}    Make the navigation easier.
}    Appearance is better in tablets.
Slide navigation
Conclusion
}    Android系统实现的Density Independence 在多屏幕适
      配中担当了很重要的角色。

}    在⼀一个app中实现灵活、动态的布局。
      }    think like a web designer


}    遵从系统的guideline,尽可能多的使用成熟的UI
      patterns.
The End

Thanks for watching
Contact
 欢迎各种交流与切磋
 @Renfei
 Email:renfei@buding.cn

 期待你的加入,与布丁⼀一起创造、成长!
 Welcome to Buding Mobile(布丁移动)
 Contact:hr@buding.cn
Reference
}    http://android-developers.blogspot.com/
}    https://developer.android.com/
}    http://www.pushing-pixels.org/
}    http://www.androiduipatterns.com/
}    http://androidniceties.tumblr.com/
}    http://en.wikipedia.org/
}    http://www.alistapart.com/articles/responsive-web-design/
}    http://opensignalmaps.com/reports/fragmentation.php
Q&A
}    Email: renfei@buding.cn
Other
Most of small/normal devices are handsets
}    ∵        RES.(px) = DPI * SIZE
}             RES.(px) = RES.(dp) * G.DPI / 160
}    ASSUME   G.DPI ≈ DPI
}    ∴        RES.(dp) ≈ SIZE * 160

}    ∵        normal 的上界是640dp x 480dp
}             即⼀一个SIZE ≈ 5" (4" * 3")的设备
}    ∴        normal设备的SIZE大部分小于5 in
}    ∴        normal设备大部分为手机设备
}             Finish
Web demo gallery
Web demo gallery
Web demo gallery
Web demo gallery
Web demo gallery
Web demo gallery

More Related Content

Similar to Android DevCamp: Supporting Multiple Screens and Devices

Supporting multiple screens on android
Supporting multiple screens on androidSupporting multiple screens on android
Supporting multiple screens on androidLi SUN
 
Designing for mobile
Designing for mobileDesigning for mobile
Designing for mobileDee Sadler
 
Designing Android apps for multiple screens
Designing Android apps for multiple screensDesigning Android apps for multiple screens
Designing Android apps for multiple screensAbhijeet Dutta
 
Tech Talk July 29 - Pixel
Tech Talk July 29 - Pixel Tech Talk July 29 - Pixel
Tech Talk July 29 - Pixel Indosystem
 
Nvidia quadro sales guide
Nvidia quadro sales guideNvidia quadro sales guide
Nvidia quadro sales guideShanker Trivedi
 
How do I - Working With Images.pdf
How do I - Working With Images.pdfHow do I - Working With Images.pdf
How do I - Working With Images.pdfShaiAlmog1
 
Intro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresIntro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresAndreas Bovens
 
Html 5 mobile - nitty gritty
Html 5 mobile - nitty grittyHtml 5 mobile - nitty gritty
Html 5 mobile - nitty grittyMario Noble
 
High DPI for desktop applications
High DPI for desktop applicationsHigh DPI for desktop applications
High DPI for desktop applicationsKirill Grouchnikov
 
An Introduction to Responsive Design
An Introduction to Responsive DesignAn Introduction to Responsive Design
An Introduction to Responsive DesignValtech UK
 
Presentación WPmallorca PalmaActiva responsive design
Presentación WPmallorca PalmaActiva responsive designPresentación WPmallorca PalmaActiva responsive design
Presentación WPmallorca PalmaActiva responsive designWPMallorca
 
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phonesLumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phonesLucian Tomuța
 
Advanced Design Methods 1, Day 1
Advanced Design Methods 1, Day 1Advanced Design Methods 1, Day 1
Advanced Design Methods 1, Day 1Aaron Gustafson
 
UX and UI Designing for all android screen
UX and UI Designing for all android screenUX and UI Designing for all android screen
UX and UI Designing for all android screenArnold Saputra
 
Idiot's Guide to viewport and pixel
Idiot's Guide to viewport and pixelIdiot's Guide to viewport and pixel
Idiot's Guide to viewport and pixelNathan Campos
 
Desktop Softwares for Unmanned Aerial Systems(UAS))
Desktop Softwares for Unmanned Aerial Systems(UAS))Desktop Softwares for Unmanned Aerial Systems(UAS))
Desktop Softwares for Unmanned Aerial Systems(UAS))Kamal Shahi
 

Similar to Android DevCamp: Supporting Multiple Screens and Devices (20)

divide and qonquer
divide and qonquerdivide and qonquer
divide and qonquer
 
Supporting multiple screens on android
Supporting multiple screens on androidSupporting multiple screens on android
Supporting multiple screens on android
 
Designing for mobile
Designing for mobileDesigning for mobile
Designing for mobile
 
Designing Android apps for multiple screens
Designing Android apps for multiple screensDesigning Android apps for multiple screens
Designing Android apps for multiple screens
 
Tech Talk July 29 - Pixel
Tech Talk July 29 - Pixel Tech Talk July 29 - Pixel
Tech Talk July 29 - Pixel
 
Nvidia quadro sales guide
Nvidia quadro sales guideNvidia quadro sales guide
Nvidia quadro sales guide
 
Pixel Perfect
Pixel PerfectPixel Perfect
Pixel Perfect
 
How do I - Working With Images.pdf
How do I - Working With Images.pdfHow do I - Working With Images.pdf
How do I - Working With Images.pdf
 
Intro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS featuresIntro to @viewport & other new Responsive Web Design CSS features
Intro to @viewport & other new Responsive Web Design CSS features
 
Html 5 mobile - nitty gritty
Html 5 mobile - nitty grittyHtml 5 mobile - nitty gritty
Html 5 mobile - nitty gritty
 
High DPI for desktop applications
High DPI for desktop applicationsHigh DPI for desktop applications
High DPI for desktop applications
 
An Introduction to Responsive Design
An Introduction to Responsive DesignAn Introduction to Responsive Design
An Introduction to Responsive Design
 
Presentación WPmallorca PalmaActiva responsive design
Presentación WPmallorca PalmaActiva responsive designPresentación WPmallorca PalmaActiva responsive design
Presentación WPmallorca PalmaActiva responsive design
 
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phonesLumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
Lumia App Labs #17: Optimising your Nokia Lumia apps for large screen phones
 
Advanced Design Methods 1, Day 1
Advanced Design Methods 1, Day 1Advanced Design Methods 1, Day 1
Advanced Design Methods 1, Day 1
 
UX and UI Designing for all android screen
UX and UI Designing for all android screenUX and UI Designing for all android screen
UX and UI Designing for all android screen
 
UI and UX for Mobile Developers
UI and UX for Mobile DevelopersUI and UX for Mobile Developers
UI and UX for Mobile Developers
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Idiot's Guide to viewport and pixel
Idiot's Guide to viewport and pixelIdiot's Guide to viewport and pixel
Idiot's Guide to viewport and pixel
 
Desktop Softwares for Unmanned Aerial Systems(UAS))
Desktop Softwares for Unmanned Aerial Systems(UAS))Desktop Softwares for Unmanned Aerial Systems(UAS))
Desktop Softwares for Unmanned Aerial Systems(UAS))
 

More from imShining @DevCamp

如何创建更加灵活的App | 大众点评 屠毅敏
如何创建更加灵活的App | 大众点评 屠毅敏如何创建更加灵活的App | 大众点评 屠毅敏
如何创建更加灵活的App | 大众点评 屠毅敏imShining @DevCamp
 
Android程序的编译,安装和运行 | 小米科技 汪文俊
Android程序的编译,安装和运行 | 小米科技 汪文俊Android程序的编译,安装和运行 | 小米科技 汪文俊
Android程序的编译,安装和运行 | 小米科技 汪文俊imShining @DevCamp
 
和Android源代码一起工作 | 海豚浏览器 胡继堂
和Android源代码一起工作 | 海豚浏览器 胡继堂和Android源代码一起工作 | 海豚浏览器 胡继堂
和Android源代码一起工作 | 海豚浏览器 胡继堂imShining @DevCamp
 
Android消息推送实现 | 友盟 徐仙明
Android消息推送实现 | 友盟 徐仙明 Android消息推送实现 | 友盟 徐仙明
Android消息推送实现 | 友盟 徐仙明 imShining @DevCamp
 
千万级并发在线推送系统架构解析 | 个信互动 叶新江
千万级并发在线推送系统架构解析 | 个信互动 叶新江千万级并发在线推送系统架构解析 | 个信互动 叶新江
千万级并发在线推送系统架构解析 | 个信互动 叶新江imShining @DevCamp
 
发现和建立多设备之间的数据通信 | 豌豆荚实验室 孙桥
发现和建立多设备之间的数据通信 | 豌豆荚实验室 孙桥发现和建立多设备之间的数据通信 | 豌豆荚实验室 孙桥
发现和建立多设备之间的数据通信 | 豌豆荚实验室 孙桥imShining @DevCamp
 
Android音频口数据通信开发 | 爱图腾 李鹏军
Android音频口数据通信开发 | 爱图腾 李鹏军Android音频口数据通信开发 | 爱图腾 李鹏军
Android音频口数据通信开发 | 爱图腾 李鹏军imShining @DevCamp
 
凡客移动应用之Android + HTML5技术运用 | 凡客 汪健飞 徐金山
凡客移动应用之Android + HTML5技术运用 | 凡客 汪健飞 徐金山凡客移动应用之Android + HTML5技术运用 | 凡客 汪健飞 徐金山
凡客移动应用之Android + HTML5技术运用 | 凡客 汪健飞 徐金山imShining @DevCamp
 
Android账户同步备份框架 | 盛大乐众ROM 郭振
Android账户同步备份框架 | 盛大乐众ROM 郭振 Android账户同步备份框架 | 盛大乐众ROM 郭振
Android账户同步备份框架 | 盛大乐众ROM 郭振 imShining @DevCamp
 
简单中的不简单,iPhone应用开发实践总结:《社区类iPhone应用开发的技术实践》| 麻麻帮 陈剑飞
简单中的不简单,iPhone应用开发实践总结:《社区类iPhone应用开发的技术实践》| 麻麻帮 陈剑飞简单中的不简单,iPhone应用开发实践总结:《社区类iPhone应用开发的技术实践》| 麻麻帮 陈剑飞
简单中的不简单,iPhone应用开发实践总结:《社区类iPhone应用开发的技术实践》| 麻麻帮 陈剑飞imShining @DevCamp
 
在iOS平台上用Cocos2D做开发 | iOS独立开发者 秦春林
在iOS平台上用Cocos2D做开发 | iOS独立开发者 秦春林在iOS平台上用Cocos2D做开发 | iOS独立开发者 秦春林
在iOS平台上用Cocos2D做开发 | iOS独立开发者 秦春林imShining @DevCamp
 
在iOS平台上实现全功能视频处理 | 盛大微酷 赵志猛
在iOS平台上实现全功能视频处理 | 盛大微酷 赵志猛在iOS平台上实现全功能视频处理 | 盛大微酷 赵志猛
在iOS平台上实现全功能视频处理 | 盛大微酷 赵志猛imShining @DevCamp
 
iOS平台应用详解:《Siri:I,robot! Siri语音识别系统详解》| 新浪 张俊林
iOS平台应用详解:《Siri:I,robot! Siri语音识别系统详解》| 新浪 张俊林iOS平台应用详解:《Siri:I,robot! Siri语音识别系统详解》| 新浪 张俊林
iOS平台应用详解:《Siri:I,robot! Siri语音识别系统详解》| 新浪 张俊林imShining @DevCamp
 
逆向工程技术详解:解开IPA文件的灰沙 -- 通过静态分析工具了解IPA实现 | 友盟 张超 | iOS DevCamp
逆向工程技术详解:解开IPA文件的灰沙 -- 通过静态分析工具了解IPA实现 | 友盟 张超 | iOS DevCamp逆向工程技术详解:解开IPA文件的灰沙 -- 通过静态分析工具了解IPA实现 | 友盟 张超 | iOS DevCamp
逆向工程技术详解:解开IPA文件的灰沙 -- 通过静态分析工具了解IPA实现 | 友盟 张超 | iOS DevCampimShining @DevCamp
 
《Passbook实战详解》| 爱图腾 廉洁 | iOS DevCamp
《Passbook实战详解》| 爱图腾 廉洁 | iOS DevCamp《Passbook实战详解》| 爱图腾 廉洁 | iOS DevCamp
《Passbook实战详解》| 爱图腾 廉洁 | iOS DevCampimShining @DevCamp
 
从知乎 iPhone 端重构说开去:Web 为主的复杂社交产品的 iOS 端开发策略及实践
从知乎 iPhone 端重构说开去:Web 为主的复杂社交产品的 iOS 端开发策略及实践从知乎 iPhone 端重构说开去:Web 为主的复杂社交产品的 iOS 端开发策略及实践
从知乎 iPhone 端重构说开去:Web 为主的复杂社交产品的 iOS 端开发策略及实践imShining @DevCamp
 

More from imShining @DevCamp (16)

如何创建更加灵活的App | 大众点评 屠毅敏
如何创建更加灵活的App | 大众点评 屠毅敏如何创建更加灵活的App | 大众点评 屠毅敏
如何创建更加灵活的App | 大众点评 屠毅敏
 
Android程序的编译,安装和运行 | 小米科技 汪文俊
Android程序的编译,安装和运行 | 小米科技 汪文俊Android程序的编译,安装和运行 | 小米科技 汪文俊
Android程序的编译,安装和运行 | 小米科技 汪文俊
 
和Android源代码一起工作 | 海豚浏览器 胡继堂
和Android源代码一起工作 | 海豚浏览器 胡继堂和Android源代码一起工作 | 海豚浏览器 胡继堂
和Android源代码一起工作 | 海豚浏览器 胡继堂
 
Android消息推送实现 | 友盟 徐仙明
Android消息推送实现 | 友盟 徐仙明 Android消息推送实现 | 友盟 徐仙明
Android消息推送实现 | 友盟 徐仙明
 
千万级并发在线推送系统架构解析 | 个信互动 叶新江
千万级并发在线推送系统架构解析 | 个信互动 叶新江千万级并发在线推送系统架构解析 | 个信互动 叶新江
千万级并发在线推送系统架构解析 | 个信互动 叶新江
 
发现和建立多设备之间的数据通信 | 豌豆荚实验室 孙桥
发现和建立多设备之间的数据通信 | 豌豆荚实验室 孙桥发现和建立多设备之间的数据通信 | 豌豆荚实验室 孙桥
发现和建立多设备之间的数据通信 | 豌豆荚实验室 孙桥
 
Android音频口数据通信开发 | 爱图腾 李鹏军
Android音频口数据通信开发 | 爱图腾 李鹏军Android音频口数据通信开发 | 爱图腾 李鹏军
Android音频口数据通信开发 | 爱图腾 李鹏军
 
凡客移动应用之Android + HTML5技术运用 | 凡客 汪健飞 徐金山
凡客移动应用之Android + HTML5技术运用 | 凡客 汪健飞 徐金山凡客移动应用之Android + HTML5技术运用 | 凡客 汪健飞 徐金山
凡客移动应用之Android + HTML5技术运用 | 凡客 汪健飞 徐金山
 
Android账户同步备份框架 | 盛大乐众ROM 郭振
Android账户同步备份框架 | 盛大乐众ROM 郭振 Android账户同步备份框架 | 盛大乐众ROM 郭振
Android账户同步备份框架 | 盛大乐众ROM 郭振
 
简单中的不简单,iPhone应用开发实践总结:《社区类iPhone应用开发的技术实践》| 麻麻帮 陈剑飞
简单中的不简单,iPhone应用开发实践总结:《社区类iPhone应用开发的技术实践》| 麻麻帮 陈剑飞简单中的不简单,iPhone应用开发实践总结:《社区类iPhone应用开发的技术实践》| 麻麻帮 陈剑飞
简单中的不简单,iPhone应用开发实践总结:《社区类iPhone应用开发的技术实践》| 麻麻帮 陈剑飞
 
在iOS平台上用Cocos2D做开发 | iOS独立开发者 秦春林
在iOS平台上用Cocos2D做开发 | iOS独立开发者 秦春林在iOS平台上用Cocos2D做开发 | iOS独立开发者 秦春林
在iOS平台上用Cocos2D做开发 | iOS独立开发者 秦春林
 
在iOS平台上实现全功能视频处理 | 盛大微酷 赵志猛
在iOS平台上实现全功能视频处理 | 盛大微酷 赵志猛在iOS平台上实现全功能视频处理 | 盛大微酷 赵志猛
在iOS平台上实现全功能视频处理 | 盛大微酷 赵志猛
 
iOS平台应用详解:《Siri:I,robot! Siri语音识别系统详解》| 新浪 张俊林
iOS平台应用详解:《Siri:I,robot! Siri语音识别系统详解》| 新浪 张俊林iOS平台应用详解:《Siri:I,robot! Siri语音识别系统详解》| 新浪 张俊林
iOS平台应用详解:《Siri:I,robot! Siri语音识别系统详解》| 新浪 张俊林
 
逆向工程技术详解:解开IPA文件的灰沙 -- 通过静态分析工具了解IPA实现 | 友盟 张超 | iOS DevCamp
逆向工程技术详解:解开IPA文件的灰沙 -- 通过静态分析工具了解IPA实现 | 友盟 张超 | iOS DevCamp逆向工程技术详解:解开IPA文件的灰沙 -- 通过静态分析工具了解IPA实现 | 友盟 张超 | iOS DevCamp
逆向工程技术详解:解开IPA文件的灰沙 -- 通过静态分析工具了解IPA实现 | 友盟 张超 | iOS DevCamp
 
《Passbook实战详解》| 爱图腾 廉洁 | iOS DevCamp
《Passbook实战详解》| 爱图腾 廉洁 | iOS DevCamp《Passbook实战详解》| 爱图腾 廉洁 | iOS DevCamp
《Passbook实战详解》| 爱图腾 廉洁 | iOS DevCamp
 
从知乎 iPhone 端重构说开去:Web 为主的复杂社交产品的 iOS 端开发策略及实践
从知乎 iPhone 端重构说开去:Web 为主的复杂社交产品的 iOS 端开发策略及实践从知乎 iPhone 端重构说开去:Web 为主的复杂社交产品的 iOS 端开发策略及实践
从知乎 iPhone 端重构说开去:Web 为主的复杂社交产品的 iOS 端开发策略及实践
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 

Recently uploaded (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 

Android DevCamp: Supporting Multiple Screens and Devices

  • 1. Android DevCamp Produced by CSDN Website: http://devcamp.csdn.net/ Weibo: http://weibo.com/cmdnclub/
  • 2. Supporting Multiple Screens in Android Android多屏幕适配
  • 3. Preface }  Author: }  Ren Fei. Android developer }  Buding Mobile / Innovation Works }  Announcement: }  本slide内容全部来自互联网,以及我自己的⼀一点臆想,如 有错误,欢迎随便指出。
  • 4. Origin of the problem 问题的由来
  • 5. Fragmentation }  上千种android设备。 }  不同的平台版本。 }  不同的屏幕尺寸、分辨率。 }  不同的输入方式。
  • 6. Platform version }  From v1.5 to v4.1. }  8 main version. 14 sub version.
  • 7. Screen sizes }  2.6" HTC G16 }  3.2" 3.7" HTC G5/G7 }  4.0" 4.3" Samsung i9000/9100 }  7.0" 7.7" 8.9" Samsung Galaxy Tab }  10.1" Moto Xoom }  …..
  • 8. Screen Resolution iPhone }  iPhone }  320*480 }  640*960 }  iPad }  1024*768 }  2048*1536
  • 9. Screen Resolution Android }  QVGA 240*320 }  WQVGA 240*400 }  HVGA 320*480 }  WVGA 480*800 }  FWVGA 480*854 }  SVGA 600*800 }  DVGA 960*640 }  WSVGA 1024*600 }  WXGA 1280*768 }  qHD 540*960 }  HD 1280*720 }  ……
  • 10. Screen RES. iPhone vs. Android
  • 11. Android System Support Android系统支持
  • 13. Some definition }  Screen resolution }  480*800 }  Screen size }  3.7" }  Screen density }  252dpi }  DPI(dots per inch), xdpi, ydpi }  DPI= RES. / SIZE }  DIP (Density-independent pixel) }  px = dp * (dpi / 160)
  • 14. Generalized SIZE/DPI }  G.DPI: hdpi/mdpi/ldpi/xhdpi }  G.SIZE: small/normal/large/xlarge
  • 15. Generalized DPI definition G.DPI DPI 1 DP = ? px ldpi (Low density) 120 dpi 0.75 mdpi (Medium density) 160 dpi 1 hdpi (High density) 240 dpi 1.5 xhdpi(Extra-high density) 320 dpi 2
  • 16. Generalized SIZE definition G.SIZE Qualifier(at least) xlarge 960dp x 720dp large 640dp x 480dp normal 470dp x 320dp small 426dp x 320dp }  Android does not currently support screens smaller than small screens.
  • 17. Relationships }  RES. + SIZE à DPI }  DPI = RES. / SIZE }  DPI à G.DPI }  ? }  SIZE à G.SIZE }  ?
  • 18. Some model device SIZE G.SIZE DPI G.DPI RES. px RES. dp HTC wildfire 2.8 in small 140dpi ldpi 240*320 320*428dp HTC hero 3.2 in normal 180dpi mdpi 320*480 320*480dp HTC desire 3.7 in normal 252dpi hdpi 480*800 320*533dp Dell Streak 5.0 in large 186dp mdpi 480*800 480*800dp HTC sensation 4.3 in normal 256dpi hdpi 540*960 360*640dp Galaxy note 5.3 in normal 280dpi xhdpi 800*1280 400*640dp HTC Flyer 7.0 in large 170dpi mdpi 600*1024 600*1024dp Galaxy tab 7.0 in normal 170dpi hdpi 600*1024 400*682dp Xoom 10.1 in xlarge 150dpi mdpi 800*1280 800*1280dp
  • 19. DPI à G.DPI }  G.DPI 大部分等于真实DPI最临近的G.DPI。 }  如果DPI正好在两个G.DPI正中间怎么办? }  G.DPI可能和DPI相差很多。 }  Samsung galaxy tab }  G.DPI是由手机厂商定义的。 }  选择标准是使新的设备能最好的适用于现有app。
  • 20. SIZE à G.SIZE }  SIZE 和 G.SIZE 并没有很明显的关系。 }  G.SIZE是由RES.(dp) 定义的。 }  参考G.SIZE的下界限定。 }  RES.(px) + G.DPI à RES.(dp) à G.SIZE
  • 21. Relationships }  RES. + SIZE à DPI }  DPI à G.DPI (mostly) }  G.DPI + RES. à G.SIZE
  • 22. Effect of G.DPI }  Developers do not need to care about real density. }  RES.(px). are aggregated to RES.(dp). }  RES.(dp) has a much smaller range. device G.SIZE G.DPI RES. px RES. dp HTC wildfire small ldpi 240*320 320*428dp HTC hero normal mdpi 320*480 320*480dp HTC desire normal hdpi 480*800 320*533dp HTC sensation normal hdpi 540*960 360*640dp Galaxy note normal xhdpi 800*1280 400*640dp Galaxy tab normal hdpi 600*1024 400*682dp
  • 23. Density independence }  根据G.DPI,系统将dp units和drawables换算调整为适 配设备的大小(px). }  A Button (100*100dp) and a icon (48px*48px in mdpi) }  Go back to see first demo.
  • 24. Support general handset 如何支持普通手机?
  • 25. Handset features }  Small and Normal devices take over 90%. }  These devices are nearly all handsets.
  • 26. Handset qualifier }  G.SIZE: small/normal }  Default Orientation: portrait }  RES.(dp): 426dp x 320dp - 640dp x 480dp.
  • 27. How to support? }  Develop a scalable app. }  Use wrap_content, fill_parent. }  Use dp not px. }  Use LinearLayout/RelativeLayout, not AbsoluteLayout. }  Provide different drawables for different dpi. }  Use more 9-patch drawable. }  …
  • 28. A simple demo 720*1280px xhdpi 540*960px hdpi 480*800px hdpi 320*480px mdpi
  • 29. Support more devices (handset & tablet) 如何支持更多的设备?
  • 30. The first guideline }  Develop one app for all devices. }  Tablets和Handsets没有明显的界限。 }  为不同的设备、分辨率开发不同的app耗费巨大且效果不佳。 }  Anti-example:
  • 31. Official Guidelines }  Build your activity designs based on fragments }  Use the action bar }  Implement flexible layouts
  • 32. Implement flexible layouts }  How to implement flexible layouts in one app? }  Official answer: Think like a web designer.
  • 33. Responsive web design }  Build something that works on any possible width or device instead of something that works on all current widths and devices. }  与其为当前所有设备、大小做支持,不如去支持所有可能 出现的情况。 }  Use css3 media queries. }  Usually combine with fluid web design.
  • 34. Media queries }  Sample: }  <link media="screen and (max-device-width: 800px)" href=“common.css" /> }  Media queries contain two components: }  A media type. (screen, print) }  A media feature(max-device-width) and query value(800px). }  Use media queries to filter css depend on device info.
  • 35. Website demo }  http://www.alistapart.com/d/responsive-web-design/ex/ex- site-FINAL.html }  3 media queries divide width to 4 part. }  @media (max-width: 400px) }  @media (max-width: 600px) }  @media (min-width: 1300px) }  Web Gallery
  • 36. Responsive mobile design }  Same content, same logical, but different representation. }  同样的内容,同样的逻辑,不同的展示方式。 }  Use configuration qualifiers to provide different layout for different devices.
  • 37. Configuration qualifiers }  Screen Size: }  small/normal/large/xlarge }  Density: }  ldpi/mdpi/hdpi/xhdpi… }  Orientation: }  port/land }  Platform version: }  v3/v4/v11/v13… }  Language: }  en/fr…
  • 38. New screen size qualifiers }  Smallest Width }  sw600dp }  Available Width }  w600dp }  Available height }  h600dp
  • 39. Web design vs Android design }  CSS vs Layout }  CSS pixel vs Dip }  Ems vs Sp }  CSS3 media query vs Configuration qualifiers }  Fluid web design vs Scalable design }  Responsive web design vs Responsive mobile design
  • 40. App demos }  IOSched2011 }  IOSched2012 }  Google Play
  • 41. IOSched2011 }  3 fragments }  4 layouts
  • 42. IOSched2011 }  layout/ layout-land/
  • 43. IOSched2011 }  layout-xlarge-land-v11/ layout-xlarge-v11
  • 44. IOSched2012 }  4 fragments }  4 layouts
  • 46. IOSched2012 }  layout/ }  layout-land/
  • 47. IOSched2012 }  layout-large-v11/ layout-large-land-v11/
  • 48. Google Play }  Version: 3.4.4 }  4 layouts }  generic_details.xml
  • 49. Google Play }  layout/ layout-land/
  • 50. Google Play }  layout-w600dp-h540dp/ layout-w800dp-h540dp/
  • 51. UI Design Patterns UI设计模式
  • 52. Android UI design patterns }  Design pattern }  对于⼀一些普遍出现的问题的通用解决方法。 }  成熟的UI patterns能在不同的设备环境下自我调节。 }  Here we introduce some useful patterns. }  Action Bar }  Workspace }  Dashboard }  Slide navigation
  • 53. Action Bar }  Replace the old TitleBar. }  Many functions: }  Menu }  Search }  Navigation }  Tab }  Spinner }  Up }  Action Mode }  Split Action Bar
  • 54. Action Bar }  Navigation(Tab)
  • 55. Action Bar }  Navigation(Spinner)/Split Action Bar/Action Mode
  • 57. Workspace }  A scrollable TabView. }  Could combine with ActionBar.
  • 59. Dashboard }  Acted as the landing page and holds all main functions.
  • 61. Slide navigation }  Could replace the Dashboard. }  Make the navigation easier. }  Appearance is better in tablets.
  • 63. Conclusion }  Android系统实现的Density Independence 在多屏幕适 配中担当了很重要的角色。 }  在⼀一个app中实现灵活、动态的布局。 }  think like a web designer }  遵从系统的guideline,尽可能多的使用成熟的UI patterns.
  • 64. The End Thanks for watching
  • 65. Contact 欢迎各种交流与切磋 @Renfei Email:renfei@buding.cn 期待你的加入,与布丁⼀一起创造、成长! Welcome to Buding Mobile(布丁移动) Contact:hr@buding.cn
  • 66. Reference }  http://android-developers.blogspot.com/ }  https://developer.android.com/ }  http://www.pushing-pixels.org/ }  http://www.androiduipatterns.com/ }  http://androidniceties.tumblr.com/ }  http://en.wikipedia.org/ }  http://www.alistapart.com/articles/responsive-web-design/ }  http://opensignalmaps.com/reports/fragmentation.php
  • 67. Q&A }  Email: renfei@buding.cn
  • 68. Other
  • 69. Most of small/normal devices are handsets }  ∵ RES.(px) = DPI * SIZE }  RES.(px) = RES.(dp) * G.DPI / 160 }  ASSUME G.DPI ≈ DPI }  ∴ RES.(dp) ≈ SIZE * 160 }  ∵ normal 的上界是640dp x 480dp }  即⼀一个SIZE ≈ 5" (4" * 3")的设备 }  ∴ normal设备的SIZE大部分小于5 in }  ∴ normal设备大部分为手机设备 }  Finish