First, I set the green color to be the background of the 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);
Then, I don't know how to get the color from this View's background... there's no getColor() function...