As Romain said, top-level View has to be Checkable. A solution could
be to make a custom container implementing Checkable interface, then
use that container as top-level View for your row. Overriden methods
just call analog methods in Checkable item inside the container.
Example:
public class CheckedLayout extends LinearLayout implements Checkable {
private CheckedTextView checkbox;
private ImageView image;
private TextView text;
private Context context;
...
@Override
public boolean isChecked() {
return checkbox.isChecked();
}
@Override
public void setChecked(boolean checked) {
checkbox.setChecked(checked);
}
@Override
public void toggle() {
checkbox.toggle();
}
}
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en