0

I'm experimenting with my UI and I found some code online that I liked with this element:

 <android.support.design.widget.TextInputLayout

However, for some reason I get that error. It used to be just about the shadowLayer but when I cleaned and rebuilt the project it expanded to '3 similar errors ignored'.

When I remove the EditText fields surrounded by TextInputLayout, the error disappears.

Paint.setShadowLayer is not supported

I am using compiled and target SDK version 23 + build tools 23.0.2. I've also included the design library like that:

  compile 'com.android.support:design:23.1.1'

This is not a duplicate of: What does this error means "The graphics preview in the layout editor may not be accurate: Paint.setShadowLayer is not supported"?

or

In Android Studio message "Paint.setShadowLayer.. graphics not accurate.." without this code

As I said, I haven't used setShadowLayer anywhere in my app and it's the TextInputLayout that's causing the problem for some reason.

So far, when I run the app everything looks fine, but anyone has any suggestions on why this is happening? Should we tackle it somehow or just not worry?

Community
  • 1
  • 1
iBobb
  • 1,140
  • 1
  • 14
  • 35
  • It is a duplicate of that- the layout you're using calls setShadowLayer in its onDraw. Answer remains the same- if it looks ok on a device/emulator, you're fine. – Gabe Sechan Feb 11 '16 at 23:12
  • I didn't know the logic behind this, thanks. So this answer "It means the preview doesn't know how to implement setShadowLayer. This means the preview won't look exactly like the result rendered on the device." means that the IDE gives us more of a warning than a kind of an error? It's just not described well if I understood you correctly at all. And by the way, I have 2 layouts which use that element and one of them just stopped giving me this error. The other one keeps doing it... That's extra weird but ... okay, I will stop worrying about shit :D – iBobb Feb 11 '16 at 23:26
  • Yeah, its definitely a warning and not an error. It means the preview may not be accurate, since it doesn't know how to do setShadowLayer its going to ignore that call and give you something close. Just in general always check your layouts in an emulator (or better yet a device), the preview app isn't 100% accurate. – Gabe Sechan Feb 11 '16 at 23:32
  • Thanks a lot, I know that and I did check but still I guess I think the IDE should be smarter (in this case by being clear it's just a warning, not saying that I even 'miss 3 similar styles' like in the screenshot). Now it makes sense :) – iBobb Feb 11 '16 at 23:36

0 Answers0