私は、総給与と、食料品、電気代、輸送、インターネットなどの対応するものに費やす金額を取る必要がある金融アプリを開発しています.私は値を取得し、パーセンテージを計算しましたdouble
。しかし、以下のステートメントはint
値のみを取りますが、 in ではprogress bar
なく in に表示したいのですprogress dialog
。
progressDialog.incrementProgressBy(x);
int amount2 = b.getInt("restaurant",2);
double res = ((double)amount2/amount) * 100;
TextView txt2 = (TextView) findViewById(R.id.tv2);
txt2.setText("percentage2\t" + res);
金額は給与総額で、amount2
レストランの請求書です。これでパーセンテージ値が にdouble
なり、 で表示する必要がありますprogress bar
。