在我的XML元素中,我尝试传递来自colors.xml资源文件的颜色。getColor函数总是返回defValue,即使它应该返回colors.xml中给定的颜色。代码TypedArraya=getContext().obtainStyledAttributes(attrs,R.styleable.accordion);finalintcol_pressed=a.getColor(R.styleable.accordion_buttonColorPressed,Color.BLACK);finalintcol_unpressed=a.getColor(R.styleable.accor