ÉèΪÊ×Ò³ ¼ÓÈëÊÕ²Ø

TOP

Android×Ô¶¨ÒåÊôÐÔ£¬attr formatȡֵÀàÐÍ
2014-11-24 07:34:54 À´Ô´: ×÷Õß: ¡¾´ó ÖРС¡¿ ä¯ÀÀ:1´Î
Tags£ºAndroid ¶¨Òå ÊôÐÔ attr format ÀàÐÍ

1. reference£º²Î¿¼Ä³Ò»×ÊÔ´ID¡£


£¨1£©ÊôÐÔ¶¨Ò壺



background" format = "reference" />



£¨2£©ÊôÐÔʹÓãº



android:layout_width = "42dip"
android:layout_height = "42dip"
android:background = "@drawable/ͼƬID"


/>


2. color£ºÑÕɫֵ¡£


£¨1£©ÊôÐÔ¶¨Ò壺



textColor" format = "color" />



£¨2£©ÊôÐÔʹÓãº



android:layout_width = "42dip"
android:layout_height = "42dip"
android:textColor = "#00FF00"


/>


3. boolean£º²¼¶ûÖµ¡£


£¨1£©ÊôÐÔ¶¨Ò壺



focusable" format = "boolean" />



£¨2£©ÊôÐÔʹÓãº



android:layout_width = "42dip"
android:layout_height = "42dip"


android:focusable = "true"


/>


4. dimension£º³ß´çÖµ¡£


£¨1£©ÊôÐÔ¶¨Ò壺



layout_width" format = "dimension" />



£¨2£©ÊôÐÔʹÓãº



android:layout_width = "42dip"
android:layout_height = "42dip"


/>


5. float£º¸¡µãÖµ¡£


£¨1£©ÊôÐÔ¶¨Ò壺



fromAlpha" format = "float" />
toAlpha" format = "float" />



£¨2£©ÊôÐÔʹÓãº


android:fromAlpha = "1.0"
android:toAlpha = "0.7"


/>


6. integer£ºÕûÐÍÖµ¡£


£¨1£©ÊôÐÔ¶¨Ò壺




frameDuration" format="integer" />
framesCount" format="integer" />




£¨2£©ÊôÐÔʹÓãº



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"


/>


7. string£º×Ö·û´®¡£


£¨1£©ÊôÐÔ¶¨Ò壺



apiKey" format = "string" />


£¨2£©ÊôÐÔʹÓãº


android:layout_width = "fill_parent"
android:layout_height = "fill_parent"
android:apiKey = "0jOkQ80oD1JL9C6HAja99uGXCRiS2CGjKO_bc_g"


/>


8. fraction£º°Ù·ÖÊý¡£


£¨1£©ÊôÐÔ¶¨Ò壺






pivotX" format = "fraction" />
pivotY" format = "fraction" />


£¨2£©ÊôÐÔʹÓãº



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"


/>


9. enum£ºÃ¶¾ÙÖµ¡£


£¨1£©ÊôÐÔ¶¨Ò壺



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



£¨2£©ÊôÐÔʹÓãº



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


10. flag£ºÎ»»òÔËËã¡£


£¨1£©ÊôÐÔ¶¨Ò壺



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" />



£¨2£©ÊôÐÔʹÓãº



android:name = ".StyleAndThemeActivity"
android:label = "@string/app_name"
android:windowSoftInputMode = "stateUnspecified | stateUnchanged¡¡|¡¡stateHidden">





×¢Ò⣺


ÊôÐÔ¶¨Òåʱ¿ÉÒÔÖ¸¶¨¶àÖÖÀàÐÍÖµ¡£


£¨1£©ÊôÐÔ¶¨Ò壺



background" format = "reference|color" />



£¨2£©ÊôÐÔʹÓãº



android:layout_width = "42dip"
android:layout_height = "42dip"
android:background = "@drawable/ͼƬID|#00FF00"


/>


¡¾´ó ÖРС¡¿¡¾´òÓ¡¡¿ ¡¾·±Ìå¡¿¡¾Í¶¸å¡¿¡¾Êղء¿ ¡¾ÍƼö¡¿¡¾¾Ù±¨¡¿¡¾ÆÀÂÛ¡¿ ¡¾¹Ø±Õ¡¿ ¡¾·µ»Ø¶¥²¿¡¿
·ÖÏíµ½: 
ÉÏһƪ£ºAndroid¶¨ÖÆÊôÓÚÄã×Ô¼ºµÄµ¼º½À¸ ÏÂһƪ£ºAndroidÖ®¸ß·Â·É¸ë´«ÊéÈȵ㴴½¨Óë..

ÆÀÂÛ

ÕÊ¡¡¡¡ºÅ: ÃÜÂë: (ÐÂÓû§×¢²á)
Ñé Ö¤ Âë:
±í¡¡¡¡Çé:
ÄÚ¡¡¡¡ÈÝ:

¡¤Linuxϵͳ¼ò½é (2025-12-25 21:55:25)
¡¤Linux°²×°MySQL¹ý³Ì (2025-12-25 21:55:22)
¡¤Linuxϵͳ°²×°½Ì³Ì£¨ (2025-12-25 21:55:20)
¡¤HTTP Åc HTTPS µÄ²î„ (2025-12-25 21:19:45)
¡¤ÍøÕ¾°²È«±ØÐ޿ΣºÍ¼ (2025-12-25 21:19:42)