Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

is it possible to display progress bar switching between one activity to another activity in android  RSS feed

 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends

I want to display progress bar from moving one activity to another activity .it take time. it will display black screen when activity two is getting value from web server is it possible? if it is can anybody give example


any help would be appreciated


 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

it take time. it will display black screen when activity two is getting value from web server


That's an indication you're doing it wrong. Anything time-consuming should not be done in the GUI thread, but in an AsyncTask in the background. You can display a message like "fetching data from server" or something like that while the network call hasn't finished, but all Activity lifecycle methods should return quickly. (They *must* return quickly, actually, because Android will terminate activities that don't respond within a certain timeframe - which can be as short as 10 seconds or so.)
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!