@Override
public View getGroupView(int groupPosition, boolean isExpanded,
View convertView, ViewGroup parent) {
String headerTitle = (String) getGroup(groupPosition);
if (convertView == null) {
LayoutInflater layoutInflater = (LayoutInflater) this.context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = layoutInflater.inflate(R.layout.list_group, null);
}
//Switch switch1 = (Switch) convertView.findViewById(R.id.switch1);
TextView lblHeader = (TextView) convertView
.findViewById(R.id.categorytv);
lblHeader.setTypeface(null, Typeface.BOLD);
lblHeader.setText(headerTitle);
return convertView;
}
I have an Expandable Listview with custom adapter. Each parent has a Textview and a switch control. Expandable view is not working
106 views Asked by sham raj At
1
After a long research I am able to figure out here is the solution that has worked out.
For the Switch
so after this my expandable list view started working as expected.