david
david

Reputation: 763

How To Add Second ProgressBar Android ProgressDialog

Friends;

How To Set ProgressDialog Second Progress Bar Like Below Images.

enter image description here

thanx.

Upvotes: 2

Views: 1957

Answers (2)

Marmoy
Marmoy

Reputation: 8079

The screenshot you show is not a ProgressDialog, it is just a Dialog with a custom layout. What you need, in order to show a dialog like the one in your picture is:

  1. A custom layout defining two ProgressBars, one below the other.

  2. Create a Dialog and call yourDialog.setContentView(R.id.yourCustomLayout)

  3. That's it, that's all you need

I would like to call your attention to the fact that you can also show the second progress in the same ProgressBar as the first, by using yourProgressBar.setSecondaryProgress(progressValue).

Upvotes: 2

Matt
Matt

Reputation: 160

Am I right in assuming that this is a layout issue? You want to have that second progress below the box that it is currently in?

If that's the case, use a relative layout and in the layout xml add this line to the progess bar:

android:layout_below="...."

In the quotation marks enter the id of the box that they are currently in.

Upvotes: 0

Related Questions