How To Add Second ProgressBar Android ProgressDialog

杀马特。学长 韩版系。学妹 提交于 2019-12-24 00:35:06

问题


Friends;

How To Set ProgressDialog Second Progress Bar Like Below Images.

thanx.


回答1:


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).




回答2:


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.



来源:https://stackoverflow.com/questions/6704940/how-to-add-second-progressbar-android-progressdialog

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!