Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Refactoring: delete toggleTask()

Signed-off-by: Simone <hello@simonewebdesign.it>
  • Loading branch information...
commit 6dde81f5ea4af47817617a443a57dbfc1709d91d 1 parent a0896c7
@simonewebdesign authored
Showing with 1 addition and 8 deletions.
  1. +1 −8 src/com/example/todolist/ItemView.java
View
9 src/com/example/todolist/ItemView.java
@@ -52,7 +52,7 @@ public void onClick(View v) {
// do something when the check is clicked
Log.v(TAG, "CheckBox clicked!");
- toggleTask(v);
+ rowEntity.setChecked(((CheckBox) v).isChecked());
}
};
@@ -65,11 +65,4 @@ public boolean onLongClick(View v) {
return false;
}
};
-
- public void toggleTask(View v) {
-
- CheckBox checkBox = (CheckBox) v;
- rowEntity.setChecked(checkBox.isChecked());
- Log.v(TAG, "CheckBox has been toggled");
- }
}
Please sign in to comment.
Something went wrong with that request. Please try again.