Пример #1
0
  @Test
  public void shouldSetMax() {
    assertThat(dialog.getMax()).isEqualTo(0);

    dialog.setMax(41);
    assertThat(dialog.getMax()).isEqualTo(41);
  }
Пример #2
0
 public void updateProgressDialog(long progress) {
   if (progress == 100) {
     progressDialog.setProgress(progressDialog.getMax());
     setResult(RESULT_OK, resultIntent);
     progressDialog.dismiss();
     finish();
   } else {
     progressDialog.setProgress((int) progress);
   }
 }