I don't think Android Studio has the ability to to this. Anyway, I have
never been able to get it working on any custom elements. I have already
used different custom elements in the layout files, but none of them did
actually work so far in Android Studio.
So I don't think the problem is the plot element you are using.
In most cases, I just test it in a simulator or on a real device. So I
am absolutely sure it works. I know it's a little stupid you can't test
your layout in de Android Studio directly, but it works for me.