Commit fa371d3b authored by mengcuiguang's avatar mengcuiguang

代码优化

parent f42bd099
...@@ -24,7 +24,11 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou ...@@ -24,7 +24,11 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
override fun convert(holder: BaseViewHolder, item: HallList.ListDTO) { override fun convert(holder: BaseViewHolder, item: HallList.ListDTO) {
if (!item.distance.isNullOrEmpty()) { if (!item.distance.isNullOrEmpty()) {
holder.getView<TextView>(R.id.tv_recommend_location).text = "" + item.distance + "KM" if(item.distance.contains("·")){
holder.getView<TextView>(R.id.tv_recommend_location).text = "" + item.distance + "KM"
}else{
holder.getView<TextView>(R.id.tv_recommend_location).text = "" + item.distance
}
} else { } else {
holder.getView<TextView>(R.id.tv_recommend_location).text = "未知" holder.getView<TextView>(R.id.tv_recommend_location).text = "未知"
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment