I've been creating custom views for a while now, but never got to make them in a way that the Android Studio preview displays them correctly.
I initialize the custom attributes using:
if (!isInEditMode()) {
...
}
But this results in an invisible component on preview. Any ideas on how to achieve this?
You need to rebuild
project. After that custom views in preview
will work