Fix editor(my IntelliJ IDEA) preview bug

add View.isInEditMode()