Android SDK源码

android 2.3.3及之前版本的SDK下载地址如下:
http://rgruet.free.fr/public/

新版本暂未找到合理的下载源,期待。。。

10
Oct 2012
AUTHOR WiFeng
CATEGORY Mobile
COMMENTS 1 Comment

attrs.xml文件中format属性值的格式

基本类型:

"reference" //引用  
"color" //颜色  
"boolean" //布尔值  
"dimension" //尺寸值  
"float" //浮点值  
"integer" //整型值  
"string" //字符串  
"fraction" //百分数,比如200%  

枚举类型:

<attr name="orientation">  
  <enum name="horizontal" value="0" />  
  <enum name="vertical" value="1" />  
</attr>

使用方法:

android:orientation = "vertical" 

标志位、位或运算,格式如下:

<attr name="windowSoftInputMode">  
  <flag name = "stateUnspecified" value = "0" />  
  <flag name = "stateUnchanged" value = "1" />  
  <flag name = "stateHidden" value = "2" />  
  <flag name = "stateAlwaysHidden" value = "3" />  
  <flag name = "stateVisible" value = "4" />  
  <flag name = "stateAlwaysVisible" value = "5" />  
  <flag name = "adjustUnspecified" value = "0x00" />  
  <flag name = "adjustResize" value = "0x10" />  
  <flag name = "adjustPan" value = "0x20" />  
  <flag name = "adjustNothing" value = "0x30" />  
</attr> 

使用方法:

android:windowSoftInputMode = "stateUnspecified|stateUnchanged|stateHidden"

属性定义可以指定多种类型:

<attr name="background" format="reference|color" /> 

使用方法:

android:background = "@drawable/图片ID|#00FF00" 
5
Sep 2012
AUTHOR WiFeng
CATEGORY Mobile
COMMENTS 2 Comments