title: adding the integers and calculating percentage and displaying the percentage using progress bar
body: <p>I am developing the financial app it should take the total salary and the amount spend for corresponding things say groceries, electricity bill, transport, internet.I have taken the values and calculated the percentage now the question is since the calculated is in <code>double</code>. But the below statement takes the <code>int</code> value only but I want display in <code>progress bar</code> not in <code>progress dialog</code>. </p>
  
  <pre><code>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);
  </code></pre>
  
  <p>the amount is the total salary and the <code>amount2</code> is restaurant bill. So now the percentage value
  is in <code>double</code> and now have to display in <code>progress bar</code>. </p>