コード例 #1
0
ファイル: KindListAdapter.java プロジェクト: norain2050/ESL
 @Override
 public View getChildView(
     int groupPosition,
     int childPosition,
     boolean isLastChild,
     View convertView,
     ViewGroup parent) {
   Kind k =
       ((Map<String, Kind>) getChild(groupPosition, childPosition))
           .get("child"); // 获取当前项的Pattern实例
   View view = LayoutInflater.from(this.context).inflate(this.childLayoutId, null);
   TextView textView = (TextView) view.findViewById(R.id.kindChildTo);
   switch (childPosition) {
     case 0:
       textView.setText("类别编号:" + k.getKindId());
       break;
     case 1:
       textView.setText("商品类别:" + k.getKindname());
       break;
     case 2:
       textView.setText("备注:" + k.getRemarks());
       break;
     default:
       break;
   }
   view.setOnLongClickListener(new KindGroupLongClickListener(groupPosition, this, this.context));
   return view;
 }
コード例 #2
0
ファイル: KindListAdapter.java プロジェクト: norain2050/ESL
 @Override
 public View getGroupView(
     int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {
   Kind k = ((Map<String, Kind>) getGroup(groupPosition)).get("group"); // 获取当前项的Pattern实例
   View view = LayoutInflater.from(this.context).inflate(this.groupLayoutId, null);
   TextView textView = (TextView) view.findViewById(R.id.kindGroupTo);
   textView.setText("商品类别:" + k.getKindname());
   return view;
 }