확장 가능한 목록보기에서 확인란을 사용하여 작업하고 있습니다. 아이의 모든 견해가 적절하게 정해졌습니다. 문제는 확인란을 선택하면 하위보기가 무작위로 선택된다는 것입니다. 그룹보기 및 자식보기를 확장하는 것처럼 자동으로 선택하면 바인딩이 명확하게 표시되면 태그가 확인란에 제대로 추가되지 않습니다.확장 가능한 목록보기 확인란 사용
enter code here
if (row == null)
{
holder=new ChildHolder();
LayoutInflater infalInflater = (LayoutInflater) this._context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
row = infalInflater.inflate(R.layout.list_item_msg, null);
holder. txtListChild = (TextView) row.findViewById(R.id.msgtextID);
holder.sendnow=(CheckBox)row.findViewById(R.id.sendnowID);
list=_listDataChild.get(_listDataHeader.get(groupPosition)).get(childPosition);
notifyDataSetChanged();
holder.sendnow.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// TODO Auto-generated method stub
// ch.setChecked(buttonView.isChecked());
notifyDataSetChanged();
// getPosition = (Integer) buttonView.getTag();
if(isChecked)
{
contactsVo childText = (contactsVo) holder.sendnow.getTag();
childText = (contactsVo) getChild(groupPosition, childPosition);
childText.setChecked(buttonView.isChecked());
personals=new ArrayList<contactsVo>();
set.add(list.getFileId());
contactsVo obj1=new contactsVo();
obj1.setImeiNo(list.getImeiNo());
obj1.setUserId(list.getUserId());
//obj.add(obj1);
personals.add(obj1);
Log.e("=================","========================");
}else
{
Log.e("Uncheked","See it");
set.remove(list.getFileId());
}
}
});
row.setTag(holder);
holder.sendnow.setTag((contactsVo) getChild(groupPosition,childPosition));
}else
{
row = convertView;
((ChildHolder) row.getTag()).sendnow.setTag((contactsVo) getChild(groupPosition,childPosition));
}
try
{
ChildHolder holder = (ChildHolder)row.getTag();
childText = (contactsVo) getChild(groupPosition,childPosition);
holder.txtListChild.setText(childText.getName());
holder.sendnow.setChecked(((contactsVo) getChild(groupPosition,childPosition)).isChecked());
}catch(Exception e)
{
e.printStackTrace();
}
을 확인하려는 경우 알아 내기 위해 부울 배열을 참조해야하지만라고한다 같은 문제가 작동하지 않습니다. – user2745359