开发者

possible xml elements in Android resources xmls?

开发者 https://www.devze.com 2022-12-23 02:16 出处:网络
I recently came across a forum post in the android developers group. (link below) http://groups.google.com/group/android-developers/browse_thread/thread/ef3bdebcb715b385

I recently came across a forum post in the android developers group. (link below) http://groups.google.com/group/android-developers/browse_thread/thread/ef3bdebcb715b385

It has one post which contains following xml. It is xml file which can be used in drawable folder.

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Non focused states -->
<item android:state_focused="false" android:state_selected="false"
android:state_pressed="false"
android:drawable="@drawable/tab_unselected" />
<item android:state_focused="false" android:state_selected="true"
android:state_pressed="false"
android:drawable="@drawable/tab_selected" />

<!-- Focused states -->
<item android:state_focused="true" android:state_selected="false"
android:state_pressed="false" android:drawable="@drawable/tab_focus"
/>
<item android:state_focused="true" android:state_selected="true"
 android:state_pressed="false" android:drawable="@drawable/tab_focus"/>

<!-- Pressed -->
<item android:state_pressed="true" android:drawable="@drawable/tab_press" />
</selector>

Now my question is, where is the documentation which tells me that i can use the following xml tags <selector> ,开发者_如何学编程 <item>, <color>, <integer-array>, <string-array> and many others tag to create xml resources...?

I hope, i have explained what i want to know ?


where is the documentation which tells me that i can use the following xml tags <selector> , <item>, <color>, <integer-array>, <string-array> and many others tag to create xml resources

Unfortunately, there is no such documentation in a single place. A few are described here, but many, particularly the Drawable ones, are not.

However, there are many samples in the $ANDROID_HOME/platforms/$SDK/data/res tree in your SDK installation (where $ANDROID_HOME is where you installed it and $SDK is the name of some SDK release, such as android-2.1).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号