Back to project page PuppyFrame.
The source code is released under:
MIT License
If you think the Android project PuppyFrame 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 com.boztalay.puppyframeuid.configuration.views; /*from w ww . ja va 2 s . c o m*/ import android.content.Context; import android.util.AttributeSet; import android.widget.ImageView; import com.boztalay.puppyframeuid.R; public class SelectableImageView extends ImageView { private boolean checked; public SelectableImageView(Context context) { this(context, null); } public SelectableImageView(Context context, AttributeSet attrs) { this(context, attrs, 0); } public SelectableImageView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); checked = false; } public void toggleChecked() { setChecked(!checked); } public void setChecked(boolean checked) { this.checked = checked; if(checked) { setColorFilter(getResources().getColor(R.color.selected_image_tint)); } else { setColorFilter(0); } } }