It is probably well know that eclipse calls a component's constructor when it has to show the component in the XML graphical layout, so it knows how it will look like.
How do I check in a constructor call if the call was made for design time (above case) or for actual runtime?
I think you're looking for View.isInEditMode()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With