[Solved] Android Checkbox getchecked (CompoundButton.OnCheckedChangeListener (without button click event))

You are fetching your CheckBox with findViewById(R.id.checkbox); when in the xml, the id is android:id=”@+id/checkBox” The id is case sensitive so check your capitalization. Basically your code is fetching a view by ID and not finding it. Therefore your cb object is set to null and you throw a nullpointer here cb.setOnCheckedChangeListener(this); 0 solved Android … Read more

[Solved] How can I showing checkbox when I choose the spinner data?

try this custom Class public class MultiSelectionSpinner extends Spinner implements OnMultiChoiceClickListener { String[] _items = null; boolean[] mSelection = null; boolean[] mSelectionAtStart = null; String _itemsAtStart = null; ArrayAdapter<String> simple_adapter; public MultiSelectionSpinner(Context context) { super(context); simple_adapter = new ArrayAdapter<>(context, android.R.layout.simple_spinner_item); super.setAdapter(simple_adapter); } public MultiSelectionSpinner(Context context, AttributeSet attrs) { super(context, attrs); simple_adapter = new ArrayAdapter<>(context, android.R.layout.simple_spinner_item); … Read more