What is AttributeSet in Android?
How can i use it for my custom view?
When a view is created from an XML layout, all of the attributes in XML tag are read from the resource bundle and passed to view's constructor as an AttributeSet
Although it is possible to read values from the AttributeSetdirectly, doing so has some disadvantages:
Instead pass AttributeSet to obtainStyledAttribute(). This method passes back TypedArray array of values that have been deferenced and styled.