I have been facing problems when using DialogFragments
or AlertDialogs
on Xiaomi Redmi S2 (Android 8.1) while deploying an instant app. For the rest of the devices that I have tested everything seems to be just fine.
The problem occurs when I get to call DialogFragment()
or AlertDialog
to open, it takes them about 4-5s to appear. When I look at logs, I see that every method (onCreate()
,onViewCreated()
) is executed on time, but the dialog appears with this huge lag!
This problem disappears if I change my class that inherits DialogFragment() to inherit just Fragment(), but that is not what I need.
Can anybody suggest where to look out for the problem?