2

I want to create a constraintLayout with a circle progressBar in front of a dialog. And it used for a loading screen and lock every action while loading. But i cannot find anyway to do that.

I searched on Google but cannot find a working solution..

searching_1

searching_2

I tried:

layoutTop.bringToFront();
layoutTop.invalidate();

and I put these code more that once in my activity. But the dialog is always on top of my constraintLayout.

I used to use ProgressDialog which is cool and can show on top of everything easily. But it deprecated in API lv. 26.

Is there other simple method to bring layout in front of a dialog?

Thanks so much of any help!

AskNilesh
  • 67,701
  • 16
  • 123
  • 163
Mike Yan
  • 1,669
  • 2
  • 21
  • 27
  • why don't you use your own custom dialog which can extend alert dialog ? in this way you can use it as a progress dialog too and it is also not deprecated ;) – Umair Dec 13 '17 at 05:00
  • implement your progressbar on your dialog – yogesh lokhande Dec 13 '17 at 05:00
  • I have many button on my page. Each button will create one dialog programmatically. If I implement the progressbar inside my dialog, I need to input the code in maybe 20 dialog. It can do the job but if possible I want to handle the loading layout in the parent layout – Mike Yan Dec 13 '17 at 05:26

0 Answers0