java - Dialog Fragment Not Displaying on Launch -


so have application, on startup launches splash screen activity , checks see if user account has been linked app. if 1 has app launches main activity , bypasses splash silently. if there no user account pulls down database in asynctask , asks user login/create account.

on first startup app syncs server , pulls down database. i'm trying dialogfragment indeterminate progress bar display database pulled down. right dialogfragment created in onpreexecute() of asynctask, asynctask executed in activity's onstart() method problem i'm having dialog not being drawn screen.

i have debug logging shows dialog's oncreate() executing , sync successful. dialog shown/dismissed in onpreexecute() , onpostexecute() respectively both of execute on ui thread. realize if database download fast won't display long i'm not seeing brief flash of dialog in emulator.

could 'problem' emulator dialog's frames being skipped or not creating dialog @ point drawn screen.

from description see 2 possible reasons:
1. maybe doesn't show right dialogfragment, see example.
2. asynctask launched in different thread (not on uithread), if need access uithread (from asunctask), try override onprogressupdate see tutorial.
hope helpfull.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -