Hi. I am working on a counting app and when it counts I want it to show a whole number with no decimal place. I'm not sure how to do this so any suggestions are welcome. Thanks.
i think i get the intent thing but i dont believe that will work with what i am doing. How does the DecimalFormat work? Here is my current code for what im working with with the decimals
private OnLongClickListener subtractRight = new OnLongClickListener() {
public boolean onLongClick(View v) {
Double scoreRight = Double.parseDouble(TextView02.getText().toString());
Double addOne = Double.parseDouble(TextView03.getText().toString());
{Double scoreLeftTotal = (scoreRight - addOne);
TextView02.setText(scoreLeftTotal.toString());
}
return true;
}
};
its like that in like four different area, giving different code for stuff like adding and subtracting points
Hi,
If your app stops unexpectedly, it's because happens some exception.
You can find this exception in the Logcat window.
If you put here the content of Logcat or a screenshot of it, I can help you.
textView.setText(R.strings.my_string_resource);
TextView01.setText(scoreLeftTotal);
TextView01.setText(scoreLeftTotal.toString());
TextView01.setText("" + scoreLeftTotal);
We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.