diff options
Diffstat (limited to 'libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/CheckableWrapperView.java')
-rw-r--r-- | libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/CheckableWrapperView.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/CheckableWrapperView.java b/libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/CheckableWrapperView.java new file mode 100644 index 000000000..9039c3f5c --- /dev/null +++ b/libraries/StickyListHeaders/library/src/se/emilsjolander/stickylistheaders/CheckableWrapperView.java @@ -0,0 +1,31 @@ +package se.emilsjolander.stickylistheaders; + +import android.content.Context; +import android.widget.Checkable; + +/** + * A WrapperView that implements the checkable interface + * + * @author Emil Sjölander + */ +class CheckableWrapperView extends WrapperView implements Checkable { + + public CheckableWrapperView(final Context context) { + super(context); + } + + @Override + public boolean isChecked() { + return ((Checkable) mItem).isChecked(); + } + + @Override + public void setChecked(final boolean checked) { + ((Checkable) mItem).setChecked(checked); + } + + @Override + public void toggle() { + setChecked(!isChecked()); + } +} |