android addfootview

    fun createFooterLayout(invalidList: List) {
        val invalidgoodsView  = LayoutInflater.from(activity).inflate(R.layout.cart_invalid_goods_layout, null)
        val ll_good_container = invalidgoodsView.find(R.id.ll_good_container)
        invalidList.forEachIndexed { index, detailListBean ->
            val goodItem = mInflater.inflate(R.layout.item_shop_car_invalid_goods, ll_good_container, false)
            val swipeLayout = goodItem.find(R.id.swipeLayout)
            swipeLayout.setCanDrag(false)
            val ivGoodIcon = goodItem.find(R.id.iv_goods_icon)
            val tvName = goodItem.find(R.id.tv_name)
            //
            Global.displayImage(detailListBean.logoPath, ivGoodIcon)
            tvName.text = detailListBean.commodityName
            ll_good_container.addView(goodItem)
        }
        mAdapter.setFooterView(invalidgoodsView)
    }



    


        
    





你可能感兴趣的:(android addfootview)