在 ProgressDialog 中更改文本对齐方式
我有一个问题,如何更改进度对话框中的文本(基本上具有如图所示的 STYLE_HORIZONTAL)(使用 Android 1.6)
到如图所示的文本。
在这种情况下请提供帮助。 我关于进度对话框的代码是这样的:-
mProgressDialog = new ProgressDialog(PDFActivity.this);
mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
mProgressDialog.setTitle(R.string.msgDownloadingWait);
mProgressDialog.setMessage(getResources().getString(
R.string.msgDownloading));
// User is not allowed to cancel the download operation.
mProgressDialog.setCancelable(false);
mProgressDialog.setMax(serverFileCount);
mProgressDialog.show();
提前致谢。
I have problem that how to change text inside the progressdialog (basically having STYLE_HORIZONTAL as in figure) (Using Android 1.6)
to text shown in figure.
Please help out in this case.
My code about the progressdialog refers like this:-
mProgressDialog = new ProgressDialog(PDFActivity.this);
mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
mProgressDialog.setTitle(R.string.msgDownloadingWait);
mProgressDialog.setMessage(getResources().getString(
R.string.msgDownloading));
// User is not allowed to cancel the download operation.
mProgressDialog.setCancelable(false);
mProgressDialog.setMax(serverFileCount);
mProgressDialog.show();
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
几天前我得到了与此内容相关的答案(但今天更新它,因为有一些空闲时间)。
这是我用来使这个东西最好的代码。我通过自定义对话框实现了上述目标。首先,这里是我调用自定义对话框类的活动代码。
现在是与自定义对话框相关的代码。在这里我使用了
ProgressBar & CustomDialog 中的 TextViews
根据下载进行计算,进而更新 TextViews。此处使用的示例更新 textviews 和以虚拟方式显示进度条。您可以根据需要更改它。I got the answer related to this stuff some days back(but updating it today as got some free time).
Here the code that I have used for making this stuff best.I achieved above thing by Custom Dialog.Firstly here the code of activity from which I called the class of Custom Dialog.
Now the code related to the Custom Dialog. Here I have used
ProgressBar & TextViews
in CustomDialog & made calculations on basis on download which in turn updates TextViews.The example used here updates the textviews & progressbar in dummy manner.You change that as per your need.