views:

676

answers:

4

Is there any sort of xml reference?

I found this which turned out to be invaluable for me http://groups.google.com/group/android-developers/msg/d334017d72909c79

but I can't figure out how I was supposed to know how to do that, had I not found that post.

I know that the api reference has xml attributes listed for many of the classes... but what about xml tags? Where is it documented that I could build a shape using , , tags?

I'd really like to know where I can find such documentation.

+2  A: 

Here's a (200-page) start:

http://developer.android.com/reference/android/R.styleable.html

JRL
+1  A: 

I've wondered this several times too. Best I can figure there isn't any real documentation on this stuff.

I've mostly been just going through the source the SDK gives us so that I could figure out how they did it. The files in $SDK_PATH/platforms/android-1.5/data/res/ should show you how pretty much everything was done for the base system. It isn't easy and it isn't documentation, but it IS examples.

fiXedd
+3  A: 

The classes which have XML attributes, list them XML attributes in their own documentation. Attributes beginning with layout are documented in the containing layout class.

The manifest file is documented here. Google recently added a lot of new documentation, including documentation on XML resources. See this webpage on drawable resources.

There resources aren't comprehensive, so R.styleable is still often the best bet. R.attr is better if you just want to see all attributes, rather than the attributes available for a particular tag.

Casebash
+2  A: 

well, another option is while your editing the android xml files in eclipse, press "Ctrl + Space" for getting the list of the optional tags that allowed there.

Vegolath