惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
J
Java Code Geeks
雷峰网
雷峰网
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
S
Securelist
The Hacker News
The Hacker News
The Register - Security
The Register - Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Help Net Security
Help Net Security
G
Google Developers Blog
Hugging Face - Blog
Hugging Face - Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
AI
AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
N
Netflix TechBlog - Medium
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
Hacker News - Newest:
Hacker News - Newest: "LLM"
H
Hacker News: Front Page
博客园 - 司徒正美
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
B
Blog
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Security Latest
Security Latest
Engineering at Meta
Engineering at Meta
N
News and Events Feed by Topic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
U
Unit 42
V
V2EX
V2EX - 技术
V2EX - 技术
L
LINUX DO - 最新话题
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
Recorded Future
Recorded Future
P
Privacy & Cybersecurity Law Blog
美团技术团队
小众软件
小众软件
F
Fortinet All Blogs

博客园 - amey

不错的blog 系统内置的图片资源---android.R.drawable android 开发不容错过的网站 Android风格与主题(style and theme) startActivity 出错 main cannot be resolved or is not a field Android DDMS如何使用? 网上绝无仅有的Log分析教程及例子(转) 如何控制Android不锁屏 Android系统名词解释汇总 - Android讨论区::91手机论坛-91手机娱乐门户 Android开发中的drawable-(hdpi,mdpi,ldpi)和WVGA,HVGA,QVGA的区别以及联系 每一位想有所成就的程序员都必须知道的15件事(转载) MSDN一篇很好的WCF入门教程(转) GetManifestResourceStream的使用 使用Refactor找回被覆盖的代码 第一次制作.hlp文件格式的帮助文档 windows应用程序名要与配置文件命名一致 如何控制静态Form类与普通的Form类之间的切换 [windows编程]error C2664: “MessageBoxW”: 不能将参数 2 从“char *”转换为“LPCWSTR” - amey
Android中的长度单位详解
amey · 2011-05-06 · via 博客园 - amey

http://blog.csdn.net/zuolongsnail/archive/2011/05/05/6397768.aspx

在hd2(480*800分辨率)执行以下代码:

DisplayMetrics dm=new DisplayMetrics();
 activity.getWindowManager().getDefaultDisplay().getMetrics(dm);

获得的

DisplayMetrics{density=1.5, width=320, height=533, scaledDensity=1.5, xdpi=254.0, ydpi=254.0}

这里width,height是以dip为单位,而wm平台一般是以px为单位,dip*density = px。