Can’t convert to color: type=0x2 error when inflating layout in fragment but only on Samsung Galaxy and Note 4

I faced the same issue, that was caused by using attributes as a reference to color in an XML drawable.

As mentioned here on API < 21 you can’t use attrs to color in the XML drawable. So only way is to use a reference to a color resource (@color/YOURS_COLOR) or use #RGB format.

So if you want to use an XML drawable with theme depended colors you should create a drawable for each theme.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)