@Override
        public void handleMessage(Message msg) {
          bar.incrementProgressBy(7);

          if (i == 14) {
            Intent intent = new Intent(Chargement.this, Principale.class);
            startActivity(intent);
          }
        }
Exemple #2
0
  public void Gain50Exp(View view) {
    user.gain_exp(50);
    mProgress.incrementProgressBy(50);

    Snackbar snackbar = Snackbar.make(view, "You got 50 EXP!", Snackbar.LENGTH_LONG);
    snackbar.setAction("Action", null).show();

    if (mProgress.getProgress() >= mProgress.getMax()) {
      LevelUp(view);
    }
  }
 @UiThread
 public void updateProbarJob(int diff) {
   pbJob.incrementProgressBy(diff);
 }
 public void incrementProgress() {
   pbar.incrementProgressBy(1);
 }