0
我創建了自定義ImageView。獲取自定義ImageView的背景顏色
我想在我的構造函數中獲取ImageView的背景顏色。
public class CustomImageView extends ImageView{
public CustomImageView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
}
如何使用obtainStyledAttributes獲取imageview的背景顏色?