mylistview 中item的子项的布局文件xml

 @Override
        public View getView(final int position, View view, ViewGroup parent) {
            System.out.println("getView " + position + " " + view);
            if (view == null) {
                view = View.inflate(ct, R.layout.pageproject_item, null);
            }
            TextView nameTxv = (TextView) view.findViewById(R.id.txv_progectitem_title);
            TextView monthTxv = (TextView) view.findViewById(R.id.txv_projectitem_month);// 长度
            TextView actor = (TextView) view.findViewById(R.id.textView2);// 演播

            if (position != list.size()) {
                ResYsdw product = list.get(position);
                nameTxv.setText(product.getName());
                monthTxv.setText(String.valueOf(product.getJishu() + "集"));
                actor.setText(product.getActor());

                if (product.getImg2() != null && product.getImg2().contains("null") == false) {
                    imageUrl = product.getImg2();
                    ImageView image = BaseViewHolder.get(view, R.id.imv_userinformation_head);
                    imageLoader.DisplayImage(imageUrl, image, 0.8);
                }
            } else {
                view.getTag();
            }
            return view;

        }
    }

 view = View.inflate(ct, R.layout.pageproject_item, null);

原文地址:https://www.cnblogs.com/hoge/p/6233812.html