пятница, 12 сентября 2008 г.

Puzzle

Here is a puzzle:

It is said that when you obtainStyledAttributes(AttributeSet...) and you have attribute defined in xml - you will get that attribute (not from style, not from theme).
And later you can peekValue on returned TypedArray. And you can check type of that value.

But where did type come from? There is no method in AttributeSet, which returns type.



Hint: try suppliyng your own AttributeSet implementation in obtainStyledAttributes.

Комментариев нет: