5

怎么在可展开的列表组件的列表项中添加多个像TextView的组件?

下面是我在BaseExpandableListAdapter里面实现的getChildView()方法:
public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent)
{

 LinearLayout lView4 = (LinearLayout) View.inflate(context,R.id.content, null);  
 TextView name=(TextView) lView4.findViewById(R.id.name);
  name.setText(objs.get(groupPosition).childs.get(childPosition)); 
  TextView desc=(TextView) lView4.findViewById(R.id.desc);
   name.setText("待定"); 
   return lView4;
  }
查看全部
super_ants
super_ants
2017/02/15 08:06
  • expandablelistview
  • 点赞
  • 收藏
  • 回答
    私信

2个回复