I’ve been creating my own views for some time, but I couldn’t create them so that the preview in Android Studio displays them correctly.
I initialize user attributes using:
if (!isInEditMode()) {
...
}
But this leads to an invisible component in the preview. Any ideas how to achieve this?
source
share