0

I am using this library which extends ProgressBar. (https://github.com/ylyc/circular_progress_bar)

How can I use it within a ProgressDialog.

7geeky
  • 438
  • 1
  • 12
  • 26
MJ123
  • 155
  • 3
  • 15

1 Answers1

0

You have to implement AlertDialog with custom layout.

Please take a look for an example here: How to create a Custom Dialog box in android?

Community
  • 1
  • 1
JiratPasuksmit
  • 672
  • 7
  • 18
  • The class in which I write setContentView(R.layout.progressbar) is already extended as fragment. And I want to increase the progress in run time. I cant extend dialog and fragment together. – MJ123 Jul 14 '16 at 22:49
  • @MJ123 You can create new layout file which has plain FrameLayout, then in runtime phase, you just need to use FragmentTransaction to add your fragment programmatically like this example: http://stackoverflow.com/questions/20455416/programmatically-adding-fragment-to-framelayout-in-android – JiratPasuksmit Jul 14 '16 at 22:54
  • Now it will show up as a fragment right. How can I show this fragment within a progress dialog. – MJ123 Jul 14 '16 at 22:57
  • As I said, you have to create layout file with plain FrameLayout, use it as custom dialog box's layout, then add that fragment into it programmatically Please take a look at above links and combine them together :D – JiratPasuksmit Jul 14 '16 at 22:59