public MyPaint(Context context, AttributeSet attrs) {
super(context, attrs);
} public MyPaint(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle); TypedArray taRef = context.obtainStyledAttributes(attrs,
R.styleable.MyPaint, defStyle, 0); int attrCount = taRef.getIndexCount(); for (int i = 0; i < attrCount; i++) {
Log.v("test======", "" + taRef.getIndex(attrCount));
} }