Exemplo n.º 1
0
  @Test
  public void shouldSetMax() {
    assertThat(dialog.getMax()).isEqualTo(0);

    dialog.setMax(41);
    assertThat(dialog.getMax()).isEqualTo(41);
  }
Exemplo n.º 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);
   }
 }