开发者

android ProgressDialog: setting custom view instead of message - does this work?

开发者 https://www.devze.com 2023-01-14 08:25 出处:网络
In ProgressDialog\'s documentation it says: \"A dialog showing a progress indicator and an optional text message or view. Only a text message or a view can be used at the same time.\"

In ProgressDialog's documentation it says:

"A dialog showing a progress indicator and an optional text message or view. Only a text message or a view can be used at the same time."

I've gotten it working 开发者_JAVA百科beautifully with a message, but I want to use a custom view instead - a message with a cancel button. But calling setView() on the ProgressDialog seemingly has no effect - it shows the progress bar in the dialog but nothing else. I've tried it with just a TextView with the text "hello", but it doesn't show up.

Does anyone know how to get this feature to work? Is it a real feature?


A possible workaround is to create a custom dialog with a ProgressBar.

0

精彩评论

暂无评论...
验证码 换一张
取 消