Hey guys... is it safe to use ```val someView by l...
# android
l
Hey guys... is it safe to use
Copy code
val someView by lazy { findViewById(R.id.some_view) }
? My concern is can happen that an Activity / Fragment may need to recreate (inflate again) the view but being the same object? Let's say onCreate (activity) or onCreateView (fragment) is called again for the same object I think it is safe to do this in an activity, but I do not think so for Fragments 🤔
g
Yes, it's unsafe for current implementation of fragments