ProgressDialog 不显示标题和消息

ProgressDialog does not showing Title and Message

希望所有人都能很好地处理错误。

我被愚蠢的问题困住了。我不知道为什么会这样?

我创建了一个AsyncTask,因为我正在上传图片。

   /**
     * Uploading Images
     */
    private class UploadPhotosTask extends AsyncTask<Void, Integer, Integer> {

        String errorMessage;
        ArrayList<PhotoCaption> captionArrayList;
        private ProgressDialog progressDialog;

        private UploadPhotosTask(ArrayList<PhotoCaption> arrayList) {
            captionArrayList = arrayList;
        }

        @Override
        protected void onPreExecute() {
            super.onPreExecute();

            progressDialog = new ProgressDialog(AlbumPhotoDetailsActivity.this);
            progressDialog.setTitle("Wait for a while");
            progressDialog.setMessage("Uploading Photos...");
            progressDialog.setIndeterminate(true);
            progressDialog.setProgress(0);
            progressDialog.setMax(captionArrayList.size());
            progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
            progressDialog.setCancelable(false);
            progressDialog.show();
        }

        @Override
        protected void onProgressUpdate(Integer... values) {
            super.onProgressUpdate(values);
            progressDialog.setProgress(values[0]);
        }

        @Override
        protected Integer doInBackground(Void... params) {

             //Processing for upload
        }

        @Override
        protected void onPostExecute(Integer result) {
            super.onPostExecute(result);
            progressDialog.dismiss();
        }
    }

它不显示标题消息,我不知道为什么。

Note: I have tried all the possibilities. If i remove setProgressStyle(ProgressDialog.STYLE_HORIZONTAL) it is displaying circular progress but i want here Horizontal ProgressBar with Number of Images which are ready to upload.

有什么想法吗?为什么会这样?您的帮助将不胜感激。谢谢。

这是你这边的主题问题,可能textcolor在你的主题中设置为白色更改这些

<item name="android:textColorPrimary">@color/white</item>
<item name="android:textColorSecondary">@color/white</item>

改成黑色

都是关于我在 style.xml

中定义的主题问题
<item name="android:textColorPrimary">@color/colorPrimaryText</item>
<item name="android:textColorSecondary">@color/colorSecondaryText</item>

其中 colorPrimaryText 为白色。我刚刚删除了那几行。