Man, that is the change.
Type: Posts; User: PhHein
Man, that is the change.
No, you just copy that part:
add.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
counter++;...
add.setOnClickListener(new View.OnClickListener() { is broken, you've overridden onClick() twice. Copy that part from sub.setOnClickListener and it should be OK.
Please wrap your code in code tags: ...
Not without seeing all your code. These errors are nasty as the compiler could show a completely different line.
But somewhere else, if the brackets are removed. Most likely you have messed up brackets somwhere in your code. Indent everything properly and see whether you've got too many or missing brackets.
Have tried removing them brackets?