TypedArray a = context.obtainStyledAttributes(attrs, com.android.internal.R.styleable.View, defStyle, 0);
a.getDimensionPixelSize(com.android.internal.R.styleable.View_padding, layout_unknow);
这个getDimensionPixelSize函数,在android5.0上直接崩溃
Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x3
android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:572)
请问getDimensionPixelSize这个怎么解决?这个方法有替代方法吗?