Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- btnPoint.setOnClickListener(new View.OnClickListener() {
- @OnClick(R.id.btn_punt)
- public void onClick(View view) {
- //Boolean method endstring character
- getCalculationText();
- // als calculation eindigt met "." of als calculation leeg is
- if(stringEndsWithOperator() || calculation.isEmpty())
- {
- // doe calculation + niks
- tvCalculation.setText(calculation + "");
- }
- // als calculation niet eindigt met een "."
- else if(!stringEndsWithOperator())
- {
- // doe calculation + "."
- tvCalculation.setText(calculation + ".");
- }
- }
- });
Add Comment
Please, Sign In to add comment