Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Handler and Progress  RSS feed

 
Ranch Hand
Posts: 136
Android Chrome Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,

I am having trouble with Progress Dialog and Handler. The scenario is something like this - I have am having one function that set Handler to call after 2 seconds (postDelayed). I need to start Progress dialog when handler start to perform runnable function. I am able to display Progress Dialog but it is not animating all.

Any help guise?

Thanks
Pratik Goswami
 
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe your code is still running on the main thread and therefore the Animation is not not smooth. Can you post some code? That way people will have better view of your problem.
 
Pratik Goswami
Ranch Hand
Posts: 136
Android Chrome Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Monu,

Here is the code snippet -





Thanks
Pratik Goswami

 
Ranch Hand
Posts: 127
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

This Example will help you ! Click on Example ProgressDialog with a second thread on that page.

Happy AndroiDCoding!!
Regards,
Piyush
 
If tomatoes are a fruit, then ketchup must be a jam. Taste this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!