Concatenate text into a Progressidialog

Asked

Viewed 48 times

1

Situation

I have a following ProgressDialog defined with STYLE_HORIZONTAL in which it is executed after obtaining the size of a download of a file. In this way, I define its size using .setMax(tamanho). After setting the size, it starts to do the download and run the bar to the end of the Progress. There is a text below in ProgressDialog which means the percentage and the total size, in which it is automatically set as shown in the image:

Imagery

inserir a descrição da imagem aqui

Code

ProgressDialog progressDialog = new ProgressDialog(this);
progressDialog.setMessage(getResources().getString(R.string.str_title_download_new_version));
                        progressDialog.setProgressStyle(progressDialog.STYLE_HORIZONTAL);
                        progressDialog.setCancelable(false);
                        progressDialog.show();

Environment Settings

  • IDE: Eclipse Mars 2
  • SDK Target: Android 2.3.3 - Api Level 10

Doubt

I’d like to concatenate two letters at the end of 1311/4140 to refer to megabytes, for example: Mb. I did some research but was not successful. Is there any way to make this concatenation on ProgressDialog?

Hugs! =)

  • Put the code you’re using, it’s better to help

  • @Leonardodias maybe yes boss. Abs.

  • @stderr does not exist this property in progressiDialog. I am using import android.app.ProgressDialog.

  • 1

    @stderr as I said there environment settings, I am using API 10.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.