1

I have made an app in which a lot of data is coming through JSON parsing which I am using in my app.

Now, the issue is: when i go from one activity to another, it shows blank(or white) screen for some seconds , then my activity becomes visible. Why is this blank screen showing?

Please resolve this issue....Thanks in advance

pioneerBhawna
  • 578
  • 7
  • 15
  • while u r going from activity to another, r u fetching data in second activty(destination activity) ? – Android Killer Jul 16 '13 at 05:33
  • use asynctask for this. fetch data in doInBackground() method http://stackoverflow.com/questions/9671546/asynctask-android-example – Deepanker Chaudhary Jul 16 '13 at 05:35
  • 1
    If you're fetching lots of data in an onCreate method of an activity that could lead to blank screens. Make sure you fetch everything in a thread and show a loading dialog to show the progress. – nedaRM Jul 16 '13 at 05:36
  • Yes, on the basis of selection of some fields in First activity...I am doing JSON parsing and showing that result on other activity. – pioneerBhawna Jul 16 '13 at 05:36
  • do fetching data on second activity. – nilesh patel Jul 16 '13 at 08:02
  • 1
    Every cpu-intensive operation should be done on a worker thread and not in the ui main thread, which is where your activities live. You're experiencing a delay in the activity creation since in one of its callbacks methods you're doing too much work. A simple way to fix this is to use AsyncTask. – type-a1pha Jul 18 '13 at 05:58

1 Answers1

0

Set android:windowDisablePreview to true in your theme