【问题标题】:Android: Use ProgressBar within ProgresDialogAndroid:在 ProgresDialog 中使用 ProgressBar
【发布时间】:2016-07-14 21:22:07
【问题描述】:

我正在使用这个扩展 ProgressBar 的库。 (https://github.com/ylyc/circular_progress_bar)

如何在 ProgressDialog 中使用它。

【问题讨论】:

    标签: android android-progressbar


    【解决方案1】:

    您必须使用自定义布局实现 AlertDialog。

    请在此处查看示例:How to create a Custom Dialog box in android?

    【讨论】:

    • 我在其中编写 setContentView(R.layout.progressbar) 的类已经扩展为片段。我想增加运行时间的进度。我不能同时扩展对话框和片段。
    • @MJ123 您可以创建具有普通 FrameLayout 的新布局文件,然后在运行时阶段,您只需使用 FragmentTransaction 以编程方式添加片段,如下例所示:stackoverflow.com/questions/20455416/…
    • 现在它会显示为一个片段的权利。如何在进度对话框中显示此片段。
    • 正如我所说,您必须使用普通 FrameLayout 创建布局文件,将其用作自定义对话框的布局,然后以编程方式将该片段添加到其中 请查看上面的链接并将它们组合在一起:D
    猜你喜欢
    • 2021-04-02
    • 1970-01-01
    • 1970-01-01
    • 2014-10-16
    • 1970-01-01
    • 1970-01-01
    • 2017-08-15
    • 1970-01-01
    • 2014-06-01
    相关资源
    最近更新 更多