title: Should a ProgressBar wait for a moment after reaching 100%?
body: <p>I was about to get my hands on <code>ProgressDialog</code> for the first time, so I have no experience with it. But with API 26 it became deprecated and we should use a <code>ProgressBar</code> instead.
  This is my simple implementation (upload to Firebase storage):</p>
  
  <pre><code>sR.putFile(mFilePath)
                  .addOnSuccessListener(new OnSuccessListener&lt;UploadTask.TaskSnapshot&gt;() {
                      @Override
                      public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
                          mProgressBar.setProgress(0);
                          Toast.makeText(MainActivity.this, "Upload successful", Toast.LENGTH_SHORT).show();
                          Upload upload = new Upload(mEditTextFileName.getText().toString().trim(),
                                  taskSnapshot.getDownloadUrl().toString());
                          String uploadId = mDatabase.push().getKey();
                          mDatabase.child(uploadId).setValue(upload);
                      }
                  })
                  .addOnFailureListener(new OnFailureListener() {
                      @Override
                      public void onFailure(@NonNull Exception e) {
                          Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show();
                      }
                  })
                  .addOnProgressListener(new OnProgressListener&lt;UploadTask.TaskSnapshot&gt;() {
                      @Override
                      public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {
                          double progress = (100.0 * taskSnapshot.getBytesTransferred()) / taskSnapshot.getTotalByteCount();
                          mProgressBar.setProgress((int) progress);
                      }
                  });
  </code></pre>
  
  <p>Questions:</p>
  
  <ol>
  <li><p>As you can see, I reset the ProgressBar to 0 in the <code>onSucess</code> method, which makes the ProgressBar never visually reach 100%. Is this the correct approach or should the reset be delayed, so the user sees <code>100%</code> for a moment? I found no best practices.</p></li>
  <li><p>Should I disable the upload button as long as the upload is running?</p></li>
  </ol>
  
  <p>Edit: </p>
  
  <p>Is this sufficient to delay the Progressbar?</p>
  
  <pre><code>sR.putFile(mImageUri)
                  .addOnSuccessListener(new OnSuccessListener&lt;UploadTask.TaskSnapshot&gt;() {
                      @Override
                      public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
                          final Handler handler = new Handler();
                          handler.postDelayed(new Runnable() {
                              @Override
                              public void run() {
                                  mProgressBar.setProgress(0);
                              }
                          }, 500);
  
                          Toast.makeText(MainActivity.this, "Upload successful", Toast.LENGTH_SHORT).show();
                          Upload upload = new Upload(mEditTextFileName.getText().toString().trim(),
                                  taskSnapshot.getDownloadUrl().toString());
                          String uploadId = mDatabase.push().getKey();
                          mDatabase.child(uploadId).setValue(upload);
                      }
                  })
  </code></pre>