• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.)
 
reply
    Bookmark Topic Watch Topic
  • New Topic