1     @SuppressLint("InflateParams")
 2     @Override
 3     public View getChildView(int groupPosition, int childPosition,
 4             boolean isLastChild, View convertView, ViewGroup parent) {
 5         ChildHolder childHolder = null;
 6         if (convertView == null) {
 7             childHolder = new ChildHolder();
 8             convertView = inflater.inflate(R.layout.activity_event_item_item, null);
 9             childHolder.textView_Child = (TextView) convertView.findViewById(R.id.tv_item);
10             convertView.setTag(childHolder);
11         } else {
12             childHolder = (ChildHolder) convertView.getTag();
13         }
14         childHolder.textView_Child = (TextView) convertView.findViewById(R.id.tv_item);
15 
16         //-----------------------------------------------------------
17         childHolder.textView_Child.setText(childList.get(groupPosition).get(childPosition));
18         if (isLastChild) {
19             childHolder.textView_Child.setGravity(Gravity.RIGHT);
20             childHolder.textView_Child.setTextColor(convertView.getResources().getColor(R.color.red_weixin));
21         } else {
22             childHolder.textView_Child.setTextColor(convertView.getResources().getColor(R.color.black));
23         }
24         //-----------------------------------------------------------
25         return convertView;
26     }