2
我正在使用checkboxex使用可擴展列表視圖。當我檢查組複選框時,我需要檢查所有子框。如何獲得組中的所有兒童觀點?如何使用ExpandableListView查看組中的所有子視圖
public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
if (convertView == null) {
LayoutInflater vi = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
groupRow = vi.inflate(R.layout.season, parent, false);
} else {
groupRow = convertView;
}
TextView seasonTitle = (TextView) groupRow.findViewById(R.id.season_title);
seasonTitle.setText(getGroup(groupPosition).toString());
CheckBox checkBox = (CheckBox) groupRow.findViewById(R.id.season_check_box);
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
???
}
});
return groupRow;
}
謝謝。有用。 –