Skip to content

Commit

Permalink
Option to check the state of the button
Browse files Browse the repository at this point in the history
  • Loading branch information
varunest committed Dec 7, 2016
1 parent cd120ef commit 4088fbf
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,14 @@ public void setChecked(boolean flag) {
imageView.setColorFilter(isChecked ? activeImageTint : inActiveImageTint, PorterDuff.Mode.SRC_ATOP);
}

/**
* Returns whether the button is checked (Active) or not.
* @return
*/
public boolean isChecked() {
return isChecked;
}

public void setEventListener(SparkEventListener listener) {
this.listener = listener;
}
Expand Down

0 comments on commit 4088fbf

Please sign in to comment.