 <p>Add a listener when inflating the group layout. And you can distinguish which group's switch was clicked by setting a tag that corresponds to that group position.</p> <p>Here's an example:</p> <pre><code>@Override public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) { if (convertView == null) { ... // Add a switch listener Switch mySwitch = (Switch) convertView.findViewById(R.id.mySwitch); mySwitch.setTag(groupPosition); mySwitch.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { Log.e("TAG", "Clicked position: " + buttonView.getTag()); } }); } else { convertView.findViewById(R.id.mySwitch).setTag(groupPosition); } ... return convertView; } </code></pre> <p>Note that you need to set the tag each time <code>getGroupView</code> is called.</p> <p>As a sidenote: you should use a Holder pattern so you don't have to call <code>findViewById</code> (which is costly) in <code>getGroupView</code>.</p>