Skip to content

Commit e429263

Browse files
committed
negative count bug fixed
1 parent 6954872 commit e429263

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

workspace/Counter/src/com/camp/counter/tallyclass.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ public void onClick(View v) {
103103
if(!(db.getvalue(v.getTag().toString()).equals("0")))
104104
{
105105
db.subtract(v.getTag().toString());
106-
db.close();
107106
count_reg-=1;
108107
reading.setText(count_reg+"");
109108
}
110109
else
111110
Toast.makeText(getBaseContext(), "Values can't be negative!", Toast.LENGTH_SHORT).show();
111+
db.close();
112112
}
113113
};
114114

0 commit comments

Comments
 (0)