tags:

views:

47

answers:

1

All the classes in Android that can be built using XML have constructors of the form:

Context context, AttributeSet attrs, int defStyle

What is the defstyle parameter?

+1  A: 

All Views supply this constructor, so every subclass can use its own base style when inflating.

For the param, I'd like to quote the docs for the View-Class:

The defStyle is "the default style to apply to this view. If 0, no style will be applied (beyond what is included in the theme). This may either be an attribute resource, whose value will be retrieved from the current theme, or an explicit style resource."

cody