Android自定义属性,attr format取值类型

<

div id=”content” contentScore=”4649″>Android自定义属性,attr format取值类型

  1. reference:参考某一资源ID。

(1)属性定义:

toAlpha” format = “float” />

(2)属性使用:

<alpha
android:fromAlpha = “1.0
android:toAlpha = “0.7

/>

  1. integer:整型值。

(1)属性定义:


framesCount” format=”integer” />


(2)属性使用:

<animated-rotate

xmlns:android = “http://schemas.android.com/apk/res/android
android:drawable = “@drawable/图片ID”
android:pivotX = “50%”
android:pivotY = “50%”
android:framesCount = “12
android:frameDuration = “100

/>

  1. string:字符串。

(1)属性定义:






pivotY” format = “fraction” />

(2)属性使用:

<rotate

xmlns:android = “http://schemas.android.com/apk/res/android
   android:interpolator = “@anim/动画ID”

android:fromDegrees = “0”
   android:toDegrees = “360”

android:pivotX = “200%

android:pivotY = “300%
   android:duration = “5000”

android:repeatMode = “restart”

android:repeatCount = “infinite”

/>

  1. enum:枚举值。

(1)属性定义:


http://schemas.android.com/apk/res/android“
android:orientation = “vertical
android:layout_width = “fill_parent”
android:layout_height = “fill_parent”
>

  1. flag:位或运算。

(1)属性定义:





注意:

属性定义时可以指定多种类型值。

(1)属性定义:

Android</spa