Is mTextColor of GridPasswordView a ColorStateList or a Color?
zhjl37 opened this issue · 0 comments
zhjl37 commented
mTextColor = ta.getColorStateList(R.styleable.gridPasswordView_gpvTextColor);
if (mTextColor == null)
mTextColor = ColorStateList.valueOf(getResources().getColor(android.R.color.primary_text_light));
ISSUE FOUND:
android.R.color.primary_text_light is a ColorStateList xml resource. But the xml resource is called by Resources#getColor(int).
NOTICE THAT:
Resources#getColor(int) just return a color value (if the input xml resource is a ColorStateList xml resource, just return the default color of the ColorStateList xml resource.).
Are you sure to do that?
SUGGEST:
mTextColor = getResources().getColorStateList(android.R.color.primary_text_light);