【发布时间】:2014-12-17 12:55:21
【问题描述】:
首先,我将绿色设置为 View mIcon 的背景,
View mIcon = findViewById(R.id.xxx);
GradientDrawable gdraw = (GradientDrawable) mContext.getResources().getDrawable(R.drawable.roundbtn_white_normal);
gdraw.setColor(Color.GREEN);
mIcon.setBackgroundDrawable(gdraw);
然后,我不知道如何从这个 View 的背景中获取颜色...没有 getColor() 函数...
【问题讨论】:
标签: android