
屏幕适配
IceHermes
这个作者很懒,什么都没留下…
展开
-
关于android分辨率兼容问题(一)
关于手机分辨率相关术语和概念 屏幕尺寸:实际的物理尺寸,屏幕的对角线测量。为了方便,android把所有的屏幕尺寸分为了4个广义的大小:小,正常,大,特大。 屏幕密度:屏幕的物理面积内像素的数量,通常称为DPI(每英寸点数)。为了方便,android把所有的实际屏幕密度分为:低,中,高,特高。 方向:从用户的角度来看,就转载 2013-11-18 15:58:14 · 1298 阅读 · 0 评论 -
ImageView中android:adjustViewBounds属性
public voidsetAdjustViewBounds(boolean adjustViewBounds)Since: API Level 1Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.Rel转载 2013-11-20 13:52:18 · 30425 阅读 · 1 评论 -
getDimension,getDimensionPixelOffset和getDimensionPixelSize
dimens.xml里写上三个变量:[java] view plaincopy"activity_vertical_margin1">16dp "activity_vertical_margin2">16px "activity_vertical_margin3">16sp 读取这三个变量:转载 2013-11-19 14:05:57 · 15321 阅读 · 4 评论 -
Android的计量单位px,in,mm,pt,dp,dip,sp
px :是屏幕的像素点in :英寸mm :毫米pt :磅,1/72 英寸dp :一个基于density的抽象单位,如果一个160dpi的屏幕,1dp=1pxdip :等同于dpsp :同dp相似,但还会根据用户的字体大小偏好来缩放。建议使用sp作为文本的单位,其它用dipdip和px 的关系:QVGA: density=0转载 2013-11-19 16:10:12 · 930 阅读 · 0 评论 -
Android resource notlong / long identifiers not working
Android resource notlong / long identifiers not workingup vote1down votefavorite1Currently I have the following resource folders: 1. layout-sw600dp 2.转载 2013-11-19 14:22:01 · 1867 阅读 · 0 评论 -
Android 在xml中配置 float 和 integer 值
1.float的配置方法 andriod 默认不支持float型的设置,在values 下的新建floats.xml 文件,在内部添加如下代码:[html] view plaincopyspan style="font-size:14px;">xml version="1.0" encoding="utf-8"?> res转载 2013-11-19 09:17:48 · 8425 阅读 · 0 评论 -
Android layout属性大全
Android layout属性大全布局:AbsoluteLayout(绝对布局):xmlns:android="http://scmemas.android.com/apk/res/android"style="@..."android:clipChildren="true|false"android:clipToPadding="true|false"转载 2013-11-18 19:09:09 · 1020 阅读 · 0 评论 -
values文件夹
Number of xml files in project: 229Number without xmlns parameter: 16 (All of these files will trip this bug.) res/values/arrays.xml res/values/attrs.xml res/values/colors.xml res/values/ids.xml原创 2013-11-18 18:46:26 · 2162 阅读 · 0 评论 -
代码实现Layout android:layout_alignParentRight
例如: android:id="@+id/account_option" android:layout_width="20px" android:layout_height="20px" android:focusable="true" android:src="@drawable/accountoptionbutton" android:lay转载 2013-11-18 17:37:42 · 15445 阅读 · 0 评论 -
4种必须知道的Android屏幕自适应解决方案
以下是Demo首页的预览图demo下载:http://www.eoeandroid.com/forum.php?mod=attachment&aid=NjE0Njh8ZTIyZDA2M2N8MTMzODgyOTQxN3w1NzAwOTV8MTczOTcz一、细说layout_weight 目前最为推荐的Android多屏幕自适应解决方案。 该属性转载 2014-02-25 16:45:24 · 49123 阅读 · 14 评论