I have a DialogFragment that is shown when the user clicks a button in the Activity.
The problem is that the fragment layout is slightly complex and it needs to load some resources. This makes a small delay the first time the dialog is shown, but after the first it is shown instantly (I suppose thats because the resources and the layout inflation are cached).
Since it is very likely that the user click the button I’d like to pre-cache in order to avoid that first-time delay.
How can I do it?
you can try to find your fragment is load before or not ?