コードの次のセクションで、テキストボックスに2つの数字を追加しようとしましたが、2つの小さい数字を追加するとうまくいきますが、2つの大きな数字、例えば552886588と5588488を追加すると5.58475076E8テキストボックスに2つの数字を追加する
if (check.isChecked()) {
TextView tv1_chq = (TextView) popupView.findViewById(R.id.subname3);
TextView tv2_chq = (TextView) popupView.findViewById(R.id.subtotal3);
tv1_chq.setText("CHEQUE AMOUNT:");
Double sum_cheque = Double.parseDouble(totalamt_checknew.getText().toString());
if (rootlayout_check.getChildCount() > 0) {
for (int i = 0; i <= rootlayout_check.getChildCount() - 1; i++) {
View v;
v = rootlayout_check.getChildAt(i);
EditText et3 = (EditText) v.findViewById(R.id.checktotal);
sum_cheque = sum_cheque + Double.parseDouble(et3.getText().toString());
}
}
tv2_chq.setText(String.valueOf(sum_cheque));
使用することができます。そうじゃない? – Sweeper
はい、それは整数フォーマットにしたいのですが – phoenixshiv
'私はそれを整数フォーマットにしたいのですが' - なぜ 'Double'sを使うのですか '整数'ではないのですか? –