Back to project page holoreader.
The source code is released under:
GNU General Public License
If you think the Android project holoreader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.hdodenhof.holoreader.misc; //from ww w. j a v a 2 s . c o m import android.content.Context; import android.util.AttributeSet; import android.widget.CheckBox; import android.widget.Checkable; import android.widget.LinearLayout; import de.hdodenhof.holoreader.R; public class CheckableLinearLayout extends LinearLayout implements Checkable { private CheckBox mCheckbox; public CheckableLinearLayout(Context context, AttributeSet attrs) { super(context, attrs); } @Override protected void onFinishInflate() { super.onFinishInflate(); mCheckbox = (CheckBox) findViewById(R.id.list_item_editfeed_checkbox); } @Override public boolean isChecked() { return mCheckbox != null ? mCheckbox.isChecked() : false; } @Override public void setChecked(boolean checked) { if (mCheckbox != null) { mCheckbox.setChecked(checked); } } @Override public void toggle() { if (mCheckbox != null) { mCheckbox.toggle(); } } }