Friday, June 15, 2012

[android-developers] A free article on Android custom attributes

It turns out there is a little bit of depth to android custom
attributes. These are the XML attributes that you can use for your own
custom views in layout files.

I have collected my research notes into a proper article and posted it at

http://satyakomatineni.com/item/4169

This article will answer the following questions

What are custom attributes?
Why use custom attributes?
How do you code a custom class?
How do you specify a custom attribute?
Do you have to define a custom attribute to Android?
Where do you have to define a custom attribute to Android?
What is AttributeSet?
What is TypedArray?
How do you read a custom attribute in your java code?
What is the styleable tag?
What is attrs.xml?
Does the name of a styleable tag need to match your java custom view name?
How do you declare a namespace for your custom attribute?
Do you need to declare your namespace differently if you have a sub package?
Do you need to specify package/sub-package name for your custom view
class in a styleable?
Does an attribute name has to be unique in your entire package?
Can a styleable grouping avoid attribute name uniqueness constraint?

http://satyakomatineni.com/android/training
http://satyakomatineni.com
http://androidbook.com
http://twitter.com/SatyaKomatineni

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment