package com.yidian.shenghuoquan.bmanagercenter.ui.store.adapter

import android.annotation.SuppressLint
import android.widget.TextView
import com.amap.api.services.core.PoiItem
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.yidian.bcommon.extensions.hide
import com.yidian.shenghuoquan.bmanagercenter.R

/**
 * pio搜索列表适配器
 */
class PoiSearchAdapter : BaseQuickAdapter<PoiItem, BaseViewHolder>(R.layout.item_store_address) {

  @SuppressLint("SetTextI18n")
  override fun convert(holder: BaseViewHolder, item: PoiItem) {
    holder.getView<TextView>(R.id.tv_current_location).hide()
    holder.getView<TextView>(R.id.list_view_title_text).text = item.title
    holder.getView<TextView>(R.id.list_view_area_text).text = item.provinceName + item.cityName + item.adName
  }

}
