Commit ef6058b3 by 刘鹏

feat: 专家状态未调试完提交

parent c2689a91
...@@ -11,14 +11,12 @@ import android.text.style.StyleSpan ...@@ -11,14 +11,12 @@ import android.text.style.StyleSpan
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.ydl.webview.H5Params import com.ydl.webview.H5Params
import com.ydl.webview.NewH5Activity import com.ydl.webview.NewH5Activity
import com.ydl.ydl_image.config.SimpleImageOpConfiger import com.ydl.ydl_image.config.SimpleImageOpConfiger
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.base.config.HttpConfig import com.ydl.ydlcommon.base.config.HttpConfig
import com.ydl.ydlcommon.modular.findRouteService import com.ydl.ydlcommon.modular.findRouteService
import com.ydl.ydlcommon.utils.URLUtils import com.ydl.ydlcommon.utils.URLUtils
...@@ -33,10 +31,8 @@ import com.yidianling.consultant.model.bean.ExpertServiceItem ...@@ -33,10 +31,8 @@ import com.yidianling.consultant.model.bean.ExpertServiceItem
import com.yidianling.consultant.modular.utils.TempH5RouteUtils import com.yidianling.consultant.modular.utils.TempH5RouteUtils
import com.yidianling.consultant.router.ConsultantIn import com.yidianling.consultant.router.ConsultantIn
import com.yidianling.user.api.service.IUserService import com.yidianling.user.api.service.IUserService
import kotlinx.android.synthetic.main.consultant_expert_search_feedbackrate.view.*
import kotlinx.android.synthetic.main.consultant_expert_search_header_view.view.* import kotlinx.android.synthetic.main.consultant_expert_search_header_view.view.*
import kotlinx.android.synthetic.main.consultant_expert_search_item_view.view.* import kotlinx.android.synthetic.main.consultant_expert_search_item_view.view.*
import kotlinx.android.synthetic.main.consultant_expert_search_products_item.view.*
import kotlinx.android.synthetic.main.consultant_item_empty.view.* import kotlinx.android.synthetic.main.consultant_item_empty.view.*
import kotlinx.android.synthetic.main.consultant_item_footer.view.* import kotlinx.android.synthetic.main.consultant_item_footer.view.*
import kotlinx.android.synthetic.main.consultant_item_tag.view.* import kotlinx.android.synthetic.main.consultant_item_tag.view.*
...@@ -60,7 +56,7 @@ class ExpertSearchAdapter( ...@@ -60,7 +56,7 @@ class ExpertSearchAdapter(
} }
interface OnClickLister { interface OnClickLister {
fun onClick(searchWords:String) fun onClick(searchWords: String)
} }
private lateinit var mOnClickLister: OnClickLister private lateinit var mOnClickLister: OnClickLister
...@@ -75,7 +71,7 @@ class ExpertSearchAdapter( ...@@ -75,7 +71,7 @@ class ExpertSearchAdapter(
var hasMore = true var hasMore = true
var pageIndex: Int = 0 var pageIndex: Int = 0
var clickCount=0 // 搜索结果提示标签点击次数 var clickCount = 0 // 搜索结果提示标签点击次数
var mIsRecommendWords = false // 是否是推荐词 var mIsRecommendWords = false // 是否是推荐词
...@@ -83,340 +79,299 @@ class ExpertSearchAdapter( ...@@ -83,340 +79,299 @@ class ExpertSearchAdapter(
this.pageIndex = pageIndex this.pageIndex = pageIndex
} }
fun setIsRecommendWords(isRecommend:Boolean){ fun setIsRecommendWords(isRecommend: Boolean) {
mIsRecommendWords = isRecommend mIsRecommendWords = isRecommend
} }
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
if (holder is HeaderViewHolder) { // 搜索结果提示头部 if (holder is HeaderViewHolder) {
if (listData.size>0){ // 搜索结果提示头部
if (listData[0].is_head_view){ bindHeaderView(holder)
if (clickCount==0){ } else if (holder is NormalViewHolder) {
holder.clSearchWords.visibility = View.VISIBLE
var text = "根据匹配,为您推荐“${listData[0].related_word}”的搜索结果" bindNormalView(position, holder)
holder.tvSearchRelatedWord.text = setTextBold(text,listData[0].related_word)
holder.tvSearchWord.text = listData[0].search_content } else if (holder is FooterViewHolder) {
// 埋点 bindFooterView(holder)
if (mIsRecommendWords){ }
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,"ydl_user_map_word_visit",listData[0].search_content,listData[0].related_word,"app") }
}else{
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,"ydl_user_correction_word_visit",listData[0].search_content,listData[0].related_word,"app") /**底部布局*/
} private fun bindFooterView(holder: FooterViewHolder) {
holder.tvSearchWord.setOnClickListener { if (hasMore) {
mOnClickLister.onClick(holder.tvSearchWord.text.toString()) holder.itemView.visibility = View.VISIBLE
++clickCount holder.pbLoading.visibility = View.VISIBLE
if (clickCount==1){ holder.tvHint.text = context.getString(R.string.consultant_loading)
text = "以下是“${listData[0].search_content}”的搜索结果" } else {
holder.tvSearchRelatedWord.text = setTextBold(text,listData[0].search_content) holder.pbLoading.visibility = View.GONE
holder.tvSearchTips.text = "你要找的是不是" holder.tvHint.text = context.getString(R.string.platform_no_more)
holder.tvSearchWord.text = listData[0].related_word }
// 埋点 }
if (mIsRecommendWords){
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,"ydl_user_map_inputword_click",listData[0].related_word,listData[0].search_content,"app") /**item布局*/
}else{ private fun bindNormalView(position: Int, holder: NormalViewHolder) {
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,"ydl_user_correction_inputword_click",listData[0].related_word,listData[0].search_content,"app") val itemBean = listData[position]
} //头像
}else if (clickCount==2){ // 第二次点击搜索标签隐藏搜索匹配结果提示 val headConfig = SimpleImageOpConfiger()
// 埋点 headConfig.loadingPic = R.drawable.consultant_avatar_def_circle
if (mIsRecommendWords){ headConfig.errorPic = R.drawable.consultant_avatar_def_circle
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,"ydl_user_map_recommendword_click",listData[0].search_content,listData[0].related_word,"app") expertSearchView.showImage(
}else{ itemBean.head,
ActionCountUtils.baiDuCountSign3(ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,"ydl_user_correction_recommendword_click",listData[0].search_content,listData[0].related_word,"app") holder.imgHead,
} holder.imgHead.width,
listData.removeAt(0) holder.imgHead.height,
clickCount = 0 // 点击两次后重置为0 headConfig
} )
//咨询显示状态:1.忙碌;2.现在有空;3.今日可约;4.最近可约;5.已约满;6.休息中
when (itemBean.consult_display_status) {
6 -> {
holder.consult_display_status_str.setBackgroundColor(
ContextCompat.getColor(
context,
R.color.color_b6bece
)
)
}
5, 1 -> {
holder.consult_display_status_str.setBackgroundColor(
ContextCompat.getColor(
context,
R.color.color_f5a082
)
)
}
else -> {
holder.consult_display_status_str.setBackgroundColor(
ContextCompat.getColor(
context,
R.color.color_6ec8f9
)
)
}
}
//专家头像下方文案:如 忙碌;现在有空;今日可约;最近可约;已约满;休息中
holder.consult_display_status_str.text = itemBean.consult_display_status_str
//姓名
holder.tvName.text = itemBean.doctor_name
//省市
if (!TextUtils.isEmpty(itemBean.display_region)) {
holder.tvCity.text = itemBean.display_region
} else {
holder.tvCity.text = ""
}
//咨询师tag
holder.tvTeamCertifications.text = itemBean.title
//服务时长 经验
val durationStringBuffer = StringBuffer()
holder.tvSaleDurationForMonth.text =
durationStringBuffer.append(itemBean.sum_service_time.toInt()).append("小时").toString()
//口碑
val numSb = StringBuffer()
holder.tv_zixunOrderNum.text =
numSb.append(itemBean.evaluate_num).append("条").toString()
//咨询师标签
holder.ll_tags.removeAllViews()
itemBean.feature_tags?.let { feature_tags ->
if (feature_tags.isNotEmpty()) {
for (tag in feature_tags) {
val view = LayoutInflater.from(context)
.inflate(R.layout.consultant_item_tag, holder.ll_tags, false)
tag.tag_name.let { name ->
if (name.length > 4) {
view.tvTag.text = "${name.substring(0, 4)}…"
} else {
view.tvTag.text = name
} }
} }
if (tag.is_highlight) {
view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_eb892c)
view.tvTag.setTextColor(
ContextCompat.getColor(
context,
R.color.color_EB892C
)
)
} else {
view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_gray_1)
view.tvTag.setTextColor(
ContextCompat.getColor(
context,
R.color.platform_color_666666
)
)
}
holder.ll_tags.addView(view)
} }
} }
} else if (holder is NormalViewHolder) { }
val itemBean = listData[position]
//头像 //价格
val headConfig = SimpleImageOpConfiger() val price = BigDecimal(itemBean.min_price)
headConfig.loadingPic = R.drawable.consultant_avatar_def_circle // 去掉末尾无用的.00
headConfig.errorPic = R.drawable.consultant_avatar_def_circle val priceStr = "¥" + price.stripTrailingZeros().toPlainString() + "起"
expertSearchView.showImage( holder.tvPrice.text = priceStr
itemBean.head,
holder.imgHead, //服务方式
holder.imgHead.width, holder.attr_combine.text = itemBean.attr_combine
holder.imgHead.height,
headConfig if (1 == itemBean.open_chat_agency) {
//联系顾问
holder.tvChat.text = "联系顾问"
holder.card_chat.setCardBackgroundColor(
ContextCompat.getColor(
context,
R.color.color_6ec8f9
)
) )
//姓名 } else {
holder.tvName.text = itemBean.doctor_name //私聊状态:1.上线;2.离线;3.忙碌中
when (itemBean.chat_status) {
//服务中 2 -> {
if (itemBean.open_chat_agency == 2 && itemBean.service_status == 2) { holder.tvChat.text = "留 言"
holder.imgHead_online_server.visibility = View.VISIBLE holder.card_chat.setCardBackgroundColor(
holder.chat_people_in_question.visibility = View.GONE ContextCompat.getColor(
holder.imgHead_online.visibility = View.GONE context,
} else { R.color.color_b6bece
//不是服务中且问询人数大于0 )
when { )
itemBean.chat_num > 5 -> {
holder.chat_people_in_question.visibility = View.VISIBLE
holder.chat_people_in_question.text = "多人在问询"
}
itemBean.chat_num > 0 -> {
holder.chat_people_in_question.visibility = View.VISIBLE
holder.chat_people_in_question.text = "${itemBean.chat_num}人在问询"
}
else -> {
holder.chat_people_in_question.visibility = View.GONE
}
} }
//可预约 3 -> {
holder.imgHead_online_server.visibility = View.GONE holder.tvChat.text = "忙 碌"
if (itemBean.is_free_today== 1) { holder.card_chat.setCardBackgroundColor(
holder.imgHead_online.visibility = View.VISIBLE ContextCompat.getColor(
} else { context,
holder.imgHead_online.visibility = View.GONE R.color.color_f28e6b
)
)
}
else -> {
holder.tvChat.text = "私 聊"
holder.card_chat.setCardBackgroundColor(
ContextCompat.getColor(
context,
R.color.color_6ec8f9
)
)
} }
}
}
}
//省市 //问询 可约
if (!TextUtils.isEmpty(itemBean.display_region)) { var bottomDec = if (itemBean.chat_num > 0) {
holder.tvCity.text = itemBean.display_region if (!TextUtils.isEmpty(itemBean.today_time_des)) {
"${itemBean.chat_num}人在问询·${itemBean.today_time_des}"
} else { } else {
holder.tvCity.text = "" "${itemBean.chat_num}人在问询"
} }
} else {
//公益图标,不与其他图标冲突 if (!TextUtils.isEmpty(itemBean.today_time_des)) {
if (1 == itemBean.has_servicefree_experience) { itemBean.today_time_des
if (null != itemBean.icons && !TextUtils.isEmpty(itemBean.icons.service_free_icon)) {
expertSearchView.showImage(
itemBean.icons.service_free_icon,
holder.imgServiceFree
)
} else {
val sp = SimpleImageOpConfiger()
sp.loadingPic = R.drawable.consultant_service_free
sp.errorPic = R.drawable.consultant_service_free
expertSearchView.showImage("", holder.imgServiceFree, sp)
}
holder.imgServiceFree.visibility = View.VISIBLE
} else { } else {
holder.imgServiceFree.visibility = View.GONE ""
} }
// 展示了抗疫,就不展示其他标签 }
if (itemBean.fightEpidemicIconShow) {
itemBean.icons?.fight_epidemic_icon?.let {
GlideApp.with(context).load(itemBean.icons?.fight_epidemic_icon)
.into(holder.imgFightEpidemicIcon)
holder.imgFightEpidemicIcon.visibility = View.VISIBLE
}
if (itemBean.joinActivity == true) { if (TextUtils.isEmpty(bottomDec)) {
//活动图标 holder.chat_people_in_question.visibility = View.GONE
if (!TextUtils.isEmpty(itemBean.activityImg)) { } else {
holder.imgActivity.visibility = View.VISIBLE holder.chat_people_in_question.visibility = View.VISIBLE
GlideApp.with(context).load(itemBean.activityImg).into(holder.imgActivity) holder.chat_people_in_question.text = bottomDec
} else { }
holder.imgActivity.visibility = View.GONE
}
} else {
holder.imgActivity.visibility = View.GONE
}
//影藏其余所有标签(除公益) }
holder.imgAbilityLevel.visibility = View.GONE
holder.imgNewEnter.visibility = View.GONE /**顶部根据匹配,为您推荐布局*/
} else { private fun bindHeaderView(holder: HeaderViewHolder) {
holder.imgFightEpidemicIcon.visibility = View.GONE if (listData.size > 0) {
//能力等级标签 if (listData[0].is_head_view) {
when (itemBean.abilityLevel) { if (clickCount == 0) {
1 -> { holder.clSearchWords.visibility = View.VISIBLE
//实习 var text = "根据匹配,为您推荐“${listData[0].related_word}”的搜索结果"
holder.imgAbilityLevel.background = holder.tvSearchRelatedWord.text = setTextBold(text, listData[0].related_word)
context.resources.getDrawable(R.drawable.consultant_expert_search_shixi) holder.tvSearchWord.text = listData[0].search_content
holder.imgAbilityLevel.visibility = View.VISIBLE // 埋点
} if (mIsRecommendWords) {
2 -> { ActionCountUtils.baiDuCountSign3(
//新手 ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,
holder.imgAbilityLevel.background = "ydl_user_map_word_visit",
context.resources.getDrawable(R.drawable.consultant_expert_search_xinshou) listData[0].search_content,
holder.imgAbilityLevel.visibility = View.VISIBLE listData[0].related_word,
} "app"
else -> {
holder.imgAbilityLevel.visibility = View.GONE
}
}
//活动图标
if (!TextUtils.isEmpty(itemBean.activityImg)) {
holder.imgActivity.visibility = View.VISIBLE
GlideApp.with(context).load(itemBean.activityImg).into(holder.imgActivity)
} else {
holder.imgActivity.visibility = View.GONE
}
//新驻图标
if (itemBean.is_new_enter != null && itemBean.is_new_enter!!) {
if (null != itemBean.icons && !TextUtils.isEmpty(itemBean.icons.new_enter_icon)) {
expertSearchView.showImage(
itemBean.icons.new_enter_icon,
holder.imgNewEnter
) )
} else { } else {
val sp = SimpleImageOpConfiger() ActionCountUtils.baiDuCountSign3(
sp.loadingPic = R.drawable.consultant_new_enter ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,
sp.errorPic = R.drawable.consultant_new_enter "ydl_user_correction_word_visit",
expertSearchView.showImage("", holder.imgNewEnter, sp) listData[0].search_content,
listData[0].related_word,
"app"
)
} }
holder.imgNewEnter.visibility = View.VISIBLE holder.tvSearchWord.setOnClickListener {
} else { mOnClickLister.onClick(holder.tvSearchWord.text.toString())
holder.imgNewEnter.visibility = View.GONE ++clickCount
} if (clickCount == 1) {
} text = "以下是“${listData[0].search_content}”的搜索结果"
holder.ll_feedbackRate.removeAllViews() holder.tvSearchRelatedWord.text =
for (num in 1..5) { setTextBold(text, listData[0].search_content)
val view = LayoutInflater.from(context).inflate( holder.tvSearchTips.text = "你要找的是不是"
R.layout.consultant_expert_search_feedbackrate, holder.tvSearchWord.text = listData[0].related_word
holder.ll_feedbackRate, // 埋点
false if (mIsRecommendWords) {
) ActionCountUtils.baiDuCountSign3(
if (itemBean.evaluation_average_score >= num) { ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,
(view.imgRate as ImageView).background = "ydl_user_map_inputword_click",
context.resources.getDrawable(R.drawable.consultant_expert_search_full_star) listData[0].related_word,
} else if (itemBean.evaluation_average_score < num && itemBean.evaluation_average_score > num - 1) { listData[0].search_content,
(view.imgRate as ImageView).background = "app"
context.resources.getDrawable(R.drawable.consultant_expert_search_half_star) )
} else {
(view.imgRate as ImageView).background =
context.resources.getDrawable(R.drawable.consultant_expert_search_nothing_star)
}
holder.ll_feedbackRate.addView(view)
}
//XXX人点评
val numSb = StringBuffer()
holder.tv_zixunOrderNum.text =
numSb.append(itemBean.evaluate_num).append("").toString()
//咨询师简介
holder.tvTeamCertifications.text = itemBean.title
//咨询师标签
holder.ll_tags.removeAllViews()
itemBean.feature_tags?.let {
if (it.isNotEmpty()) {
for (tag in itemBean.feature_tags) {
val view = LayoutInflater.from(context)
.inflate(R.layout.consultant_item_tag, holder.ll_tags, false)
tag.tag_name.let { name ->
if (name.length > 4) {
view.tvTag.text = "${name.substring(0, 4)}…"
} else { } else {
view.tvTag.text = name ActionCountUtils.baiDuCountSign3(
ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,
"ydl_user_correction_inputword_click",
listData[0].related_word,
listData[0].search_content,
"app"
)
} }
} } else if (clickCount == 2) { // 第二次点击搜索标签隐藏搜索匹配结果提示
if (tag.is_highlight) { // 埋点
view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_eb892c) if (mIsRecommendWords) {
view.tvTag.setTextColor( ActionCountUtils.baiDuCountSign3(
ContextCompat.getColor( ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,
context, "ydl_user_map_recommendword_click",
R.color.color_EB892C listData[0].search_content,
listData[0].related_word,
"app"
) )
) } else {
} else { ActionCountUtils.baiDuCountSign3(
view.tvTag.setBackgroundResource(R.drawable.consultant_bg_radius_line_gray_1) ConsultBIConstants.PART_ID_YDL_USER_MAIN_PAGE,
view.tvTag.setTextColor( "ydl_user_correction_recommendword_click",
ContextCompat.getColor( listData[0].search_content,
context, listData[0].related_word,
R.color.platform_color_666666 "app"
) )
) }
} listData.removeAt(0)
holder.ll_tags.addView(view) clickCount = 0 // 点击两次后重置为0
}
}
}
//帮助人数
val orderUser = StringBuffer()
holder.tvOrderNum.text = orderUser.append(itemBean.help_num).append("").toString()
//私聊文案
if (TextUtils.isEmpty(itemBean.chat_btn_text)) {
holder.tvChat.text = "私聊"
holder.tvChat.setTextColor(
ContextCompat.getColor(
context,
R.color.platform_but_text_color
)
)
holder.tvChat.setTextColor(
ContextCompat.getColor(
context,
R.color.platform_but_text_color
)
)
holder.tvChat.background =
ContextCompat.getDrawable(context, R.drawable.consultant_expert_search_chat)
} else {
holder.tvChat.text = itemBean.chat_btn_text
holder.tvChat.setTextColor(
ContextCompat.getColor(
context,
R.color.platform_color_999999
)
)
holder.tvChat.background = ContextCompat.getDrawable(
context,
R.drawable.consultant_expert_search_chat_rest
)
}
//服务时长
val durationStringBuffer = StringBuffer()
holder.tvSaleDurationForMonth.text =
durationStringBuffer.append(itemBean.sum_service_time.toInt()).append("").toString()
//价格
val price = BigDecimal(itemBean.min_price)
// 去掉末尾无用的.00
holder.tvPrice.text = price.stripTrailingZeros().toPlainString()
//套餐
holder.ll_products.removeAllViews()
if (null != itemBean.doctor_products && itemBean.doctor_products.isNotEmpty()) {
for (item in itemBean.doctor_products) {
val view = LayoutInflater.from(context).inflate(
R.layout.consultant_expert_search_products_item,
holder.ll_tags,
false
)
when (item.product_type) {
"1" -> {
view.tvTitle.text = "单次"
view.tvTitle.setTextColor(context.resources.getColor(R.color.platform_color_1DA1F2))
view.tvTitle.background =
context.resources.getDrawable(R.drawable.consultant_expert_search_single)
view.tvContent.text = item.product_name
holder.ll_products.addView(view)
}
"2" -> {
view.tvTitle.text = "套餐"
view.tvTitle.setTextColor(context.resources.getColor(R.color.consultant_color_FF9500))
view.tvTitle.background =
context.resources.getDrawable(R.drawable.consultant_expert_search_menu)
view.tvContent.text = item.product_name
holder.ll_products.addView(view)
}
else -> {
} }
} }
} }
} }
} else if (holder is FooterViewHolder) {
if (hasMore) {
holder.itemView.visibility = View.VISIBLE
holder.pbLoading.visibility = View.VISIBLE
holder.tvHint.text = context.getString(R.string.consultant_loading)
} else {
holder.pbLoading.visibility = View.GONE
holder.tvHint.text = context.getString(R.string.platform_no_more)
}
} }
} }
override fun getItemCount(): Int = override fun getItemCount(): Int =
// if (listData.size < ExpertSearchActivity.PAGE_SIZE && hasMore) { if (listData.size == 1) {
if (listData.size==1) {
listData.size listData.size
} else { } else {
listData.size + 1 listData.size + 1
...@@ -425,7 +380,8 @@ class ExpertSearchAdapter( ...@@ -425,7 +380,8 @@ class ExpertSearchAdapter(
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder = override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder =
when (viewType) { when (viewType) {
HEADER_VIEW -> { HEADER_VIEW -> {
val view = LayoutInflater.from(context).inflate(R.layout.consultant_expert_search_header_view, parent, false) val view = LayoutInflater.from(context)
.inflate(R.layout.consultant_expert_search_header_view, parent, false)
HeaderViewHolder(view) HeaderViewHolder(view)
} }
NORMAL_VIEW -> { NORMAL_VIEW -> {
...@@ -447,7 +403,7 @@ class ExpertSearchAdapter( ...@@ -447,7 +403,7 @@ class ExpertSearchAdapter(
override fun getItemViewType(position: Int): Int = override fun getItemViewType(position: Int): Int =
when { when {
position==0&&listData.size>0&&listData[0].is_head_view ->{ position == 0 && listData.size > 0 && listData[0].is_head_view -> {
HEADER_VIEW HEADER_VIEW
} }
position < listData.size -> { position < listData.size -> {
...@@ -462,28 +418,15 @@ class ExpertSearchAdapter( ...@@ -462,28 +418,15 @@ class ExpertSearchAdapter(
inner class NormalViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) { inner class NormalViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
//头像 //头像
val imgHead = itemView.imgHead!! val imgHead = itemView.imgHead!!
val cv_head_view = itemView.cv_head_view!!
//专家姓名 //专家姓名
val tvName = itemView.tvName!! val tvName = itemView.tvName!!
//活动图标 //头像下方文案
val imgActivity = itemView.img_activity!! val consult_display_status_str = itemView.consult_display_status_str!!
//优质图标
val imgAbilityLevel = itemView.imgAbilityLevel!!
//公益图标
val imgServiceFree = itemView.imgServiceFree!!
//新驻图标
val imgNewEnter = itemView.imgNewEnter!!
//荣誉标签 //服务方式
val ll_honor_layout = itemView.ll_honor_layout!! val attr_combine = itemView.attr_combine
//好评率
val ll_feedbackRate = itemView.ll_feedbackRate!!
//xxx人点评 //xxx人点评
val tv_zixunOrderNum = itemView.tv_zixunOrderNum!! val tv_zixunOrderNum = itemView.tv_zixunOrderNum!!
...@@ -494,49 +437,24 @@ class ExpertSearchAdapter( ...@@ -494,49 +437,24 @@ class ExpertSearchAdapter(
//咨询师标签 //咨询师标签
val ll_tags = itemView.ll_tags!! val ll_tags = itemView.ll_tags!!
//帮助人数
val tvOrderNum = itemView.tvOrderNum!!
//帮助人数文案
val tvOrderNumContent = itemView.tvOrderNumContent
//服务时长 //服务时长
val tvSaleDurationForMonth = itemView.tvSaleDurationForMonth!! val tvSaleDurationForMonth = itemView.tvSaleDurationForMonth!!
//月售时长文案
val tvSaleDurationForMonthContent = itemView.tvSaleDurationForMonthContent
//价格 //价格
val tvPrice = itemView.tvPrice!! val tvPrice = itemView.tvPrice!!
val tvPriceContent = itemView.tvPriceContent!!
val tv_money_symbol = itemView.tv_money_symbol!!
//服务套餐
val ll_products = itemView.ll_products!!
//私聊按钮 //私聊按钮
val tvChat = itemView.tvChat!! val tvChat = itemView.tvChat!!
//个人铭言整个布局 //私聊背景
val group_desc = itemView.group_desc!! val card_chat = itemView.card_chat!!
//个人铭言
val tvDesc = itemView.tvDesc!!
//省市 //省市
val tvCity = itemView.tvCity!! val tvCity = itemView.tvCity!!
//今日是否可约
val imgHead_online = itemView.imgHead_online!!
//服务中(咨询中或者聆听中)
val imgHead_online_server = itemView.imgHead_online_server!!
//多少人在问询 //多少人在问询
val chat_people_in_question = itemView.people_in_question!! val chat_people_in_question = itemView.people_in_question!!
// 抗疫先锋图标
val imgFightEpidemicIcon = itemView.img_fightEpidemicIcon
init { init {
itemView.setOnClickListener { itemView.setOnClickListener {
...@@ -562,7 +480,7 @@ class ExpertSearchAdapter( ...@@ -562,7 +480,7 @@ class ExpertSearchAdapter(
} }
} }
itemView.tvChat.setOnClickListener { itemView.card_chat.setOnClickListener {
if (adapterPosition != RecyclerView.NO_POSITION) { if (adapterPosition != RecyclerView.NO_POSITION) {
val doctor = listData[adapterPosition] val doctor = listData[adapterPosition]
if (pageIndex == 0) { if (pageIndex == 0) {
......
package com.yidianling.consultant.model.bean package com.yidianling.consultant.model.bean
import com.yidianling.consultant.bean.ExpertSearchProductsBean
import com.yidianling.consultant.bean.ExpertSearchTagsIconBean
/** /**
* @author yuanWai * @author yuanWai
* @描述: * @描述:
...@@ -23,153 +20,94 @@ data class ExpertServiceItem( ...@@ -23,153 +20,94 @@ data class ExpertServiceItem(
* 专家名称 * 专家名称
*/ */
val doctor_name: String?, val doctor_name: String?,
/**
* 跳转路由地址(正常为专家主页地址) /*** 跳转路由地址(正常为专家主页地址)*/
*/
val link_url: String?, val link_url: String?,
/**
* 专家头像地址 /*** 专家头像地址*/
*/
val head: String?, val head: String?,
/**
* 专家是否在线 1.在线 /*** 私聊状态:1.上线;2.离线;3.忙碌中*/
*/
val chat_status: Int?, val chat_status: Int?,
/**
* 能力等级 1.实习 2.新手 3.精英
*/ /*** 评价数(咨询订单数)*/
val abilityLevel: Int?,
/**
* 有免费咨询:1.有,2.无
*/
val has_servicefree_consult: Int?,
/**
* 活动图标
*/
val activityImg: String?,
/**
* 是否参加活动
*/
val joinActivity: Boolean?,
/**
* 是否新入驻:true:是,false:否
*/
var is_new_enter: Boolean?,
/**
* 好评率(倾诉+咨询)
*/
var evaluation_average_score: Float = 0f,
/**
* 是否抗疫先锋图标
*/
var fightEpidemicIconShow: Boolean = false,
/**
* 评价数(咨询订单数)
*/
var evaluate_num: Int = 0, var evaluate_num: Int = 0,
/**
* 咨询最低价 /*** 咨询最低价*/
*/
val min_price: String?, val min_price: String?,
/**
* 资质材料 /*** 资质材料*/
*/
val title: String?, val title: String?,
/**
* 已帮助人数(咨询人数) /*** 服务时长*/
*/
val help_num: String?,
/**
* 月售时长
*/
var p30d_sold_hour: Float = 0f,
/**
* 服务时长
*/
var sum_service_time: Float = 0f, var sum_service_time: Float = 0f,
/**
* 服务
*/
val doctor_products: MutableList<ExpertSearchProductsBean>?,
/**
* 标签图片
*/
val icons: ExpertSearchTagsIconBean?,
// /**
// * 今日是否可约
// */
// val booking_status: Int,
// /**
// * 咨询状态 1-待服务 2-服务中
// */
// var consult_status: Int,
// /**
// * 倾诉状态 1-待服务 2-服务中
// */
// var listen_status: Int,
var open_chat_agency: Int,
/***服务状态:1.空闲,2.忙碌*/
var service_status: Int, var service_status: Int,
var is_free_today: Int, /*** 私聊人数*/
/**
* 私聊人数
*/
var chat_num: Int = 0, var chat_num: Int = 0,
/**
* 个人铭言 /*** 私聊按钮的文案(如果不为空则取这个字段的值,如果为空 则默认为:“私聊”)*/
*/
val famous_remark: String?,
/**
* 省
*/
val province: String?,
/**
* 市
*/
val city: String?,
/**
* 私聊按钮的文案(如果不为空则取这个字段的值,如果为空 则默认为:“私聊”)
*/
val chat_btn_text: String?, val chat_btn_text: String?,
/** /*** 新标签分类*/
* 新标签分类
*/
val feature_tags: ArrayList<FeatureTag>?, val feature_tags: ArrayList<FeatureTag>?,
/** /*** 是否是头部headView*/
* 是否是头部headView
*/
val is_head_view: Boolean = false, val is_head_view: Boolean = false,
/**
* 搜索词 /*** 搜索词*/
*/
val search_content: String, val search_content: String,
/**
* 联想词 /*** 联想词*/
*/
val related_word: String, val related_word: String,
/**
* 地区 /*** 地区*/
*/
val display_region: String, val display_region: String,
/** /***咨询显示状态:1.忙碌;2.现在有空;3.今日可约;4.最近可约;5.已约满;6.休息中*/
* 是否展示公益图标 val consult_display_status: Int,
*/
val has_servicefree_experience: Int? /***专家头像下方文案:如 忙碌;现在有空;今日可约;最近可约;已约满;休息中*/
val consult_display_status_str: String,
/***私聊下方时间描述:如 最快可约今天19:00*/
val today_time_des: String,
/***服务方式:如 当面/视频*/
val attr_combine: String = "",
/***0:关闭代聊,1:开启代聊*/
val open_chat_agency: Int,
) { ) {
constructor(is_head_view: Boolean, search_content: String, related_word: String) : this( constructor(is_head_view: Boolean, search_content: String, related_word: String) : this(
"", "", "", "", "", id = "",
1, 1, 1, "", false, true, uid = "",
1f, false, 0, "", "", "", 1f, 1f, doctor_name = "",
null, null, 1, 1, 1, 1, link_url = "",
"", "", "", "", null, is_head_view, search_content, related_word, "", 1 head = "",
chat_status = 1,
evaluate_num = 0,
min_price = "",
title = "",
sum_service_time = 0f,
service_status = 1,
chat_num = 0,
chat_btn_text = null,
feature_tags = null,
is_head_view = is_head_view,
search_content = search_content,
related_word = related_word,
display_region = "",
consult_display_status = 2,
consult_display_status_str = "",
today_time_des = "",
attr_combine = "",
open_chat_agency = 0
) )
} }
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/color_f6f6f7" />
<corners android:radius="2dp" />
<padding
android:bottom="2dp"
android:left="4dp"
android:right="4dp"
android:top="3dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="@dimen/platform_dp_13" android:paddingLeft="@dimen/platform_dp_16"
android:paddingRight="@dimen/platform_dp_15" android:paddingTop="@dimen/platform_dp_22"
android:paddingBottom="@dimen/platform_dp_8"> android:paddingRight="@dimen/platform_dp_16">
<!--头像-->
<LinearLayout
android:id="@+id/cvHead"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_15"
android:background="@drawable/consultant_bg_radius_line_gray_05"
android:orientation="vertical">
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/cv_head_view" android:id="@+id/cv_head_view"
android:layout_width="92dp" android:layout_width="64dp"
android:layout_height="114dp" android:layout_height="80dp"
app:cardCornerRadius="4dp" app:cardCornerRadius="4dp"
app:cardElevation="0px"> app:cardElevation="0px"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView <ImageView
android:id="@+id/imgHead" android:id="@+id/imgHead"
...@@ -29,32 +29,22 @@ ...@@ -29,32 +29,22 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/consultant_avatar_def_circle" /> android:src="@drawable/consultant_avatar_def_circle" />
</androidx.cardview.widget.CardView>
</LinearLayout>
<ImageView
android:id="@+id/imgHead_online"
android:layout_width="62dp"
android:layout_height="14dp"
android:layout_alignBottom="@+id/cvHead"
android:layout_gravity="bottom"
android:scaleType="centerCrop"
android:visibility="gone"
app:srcCompat="@drawable/consultant_online_yue"
tools:visibility="visible" />
<ImageView
android:id="@+id/imgHead_online_server"
android:layout_width="41dp"
android:layout_height="14dp"
android:layout_alignBottom="@+id/cvHead"
android:layout_gravity="bottom"
android:scaleType="centerCrop"
android:visibility="gone"
app:srcCompat="@drawable/consultant_online_server"
tools:visibility="visible" />
<TextView
android:id="@+id/consult_display_status_str"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#6EC8F9"
android:gravity="center"
android:paddingTop="3dp"
android:paddingBottom="2dp"
android:textColor="@color/white"
android:textSize="11dp"
tools:text="现在有空" />
</RelativeLayout>
</androidx.cardview.widget.CardView>
<!--咨询师姓名--> <!--咨询师姓名-->
<TextView <TextView
...@@ -62,347 +52,190 @@ ...@@ -62,347 +52,190 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/platform_dp_12" android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginLeft="@dimen/platform_dp_12"
android:layout_marginTop="@dimen/platform_dp_12"
android:layout_toEndOf="@+id/cvHead"
android:layout_toRightOf="@+id/cvHead"
android:gravity="center_vertical" android:gravity="center_vertical"
android:textColor="@color/platform_color_242424" android:textColor="@color/color_1C1F28"
android:textSize="@dimen/platform_dp_18" android:textSize="@dimen/platform_dp_18"
android:textStyle="bold" android:textStyle="bold"
tools:ignore="SpUsage" app:layout_constraintLeft_toRightOf="@id/cv_head_view"
app:layout_constraintTop_toTopOf="@id/cv_head_view"
tools:text="罗静" /> tools:text="罗静" />
<LinearLayout <TextView
android:id="@+id/ll_honor_layout" android:id="@+id/tv_ns"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvName" android:layout_marginLeft="4dp"
android:layout_alignBottom="@+id/tvName" android:background="@drawable/consultant_ns_bg"
android:layout_marginStart="@dimen/platform_dp_2" android:text="2021年审"
android:layout_toEndOf="@+id/tvName" android:textColor="@color/color_62636F"
android:layout_toRightOf="@+id/tvName" android:textSize="10dp"
android:gravity="center_vertical" app:layout_constraintBaseline_toBaselineOf="@id/tvName"
android:orientation="horizontal" app:layout_constraintLeft_toRightOf="@id/tvName" />
android:paddingLeft="8dp">
<ImageView
android:id="@+id/img_fightEpidemicIcon"
android:layout_width="53dp"
android:layout_height="@dimen/platform_dp_17"
android:layout_marginRight="4dp"
android:scaleType="centerCrop"
android:visibility="gone" />
<!--活动图标-->
<ImageView
android:id="@+id/img_activity"
android:layout_width="42dp"
android:layout_height="12dp"
android:layout_marginRight="4dp"
android:visibility="gone" />
<!--公益图标-->
<ImageView
android:id="@+id/imgServiceFree"
android:layout_width="26dp"
android:layout_height="@dimen/platform_dp_12"
android:layout_marginRight="4dp"
android:scaleType="centerCrop"
tools:background="@drawable/consultant_service_free" />
<!--新驻图标-->
<ImageView
android:id="@+id/imgNewEnter"
android:layout_width="26dp"
android:layout_height="@dimen/platform_dp_12"
android:layout_marginRight="4dp"
android:scaleType="fitCenter"
tools:background="@drawable/consultant_new_enter" />
<!--优质图标-->
<ImageView
android:id="@+id/imgAbilityLevel"
android:layout_width="26dp"
android:layout_height="@dimen/platform_dp_12"
android:layout_marginRight="4dp"
android:scaleType="fitCenter"
android:visibility="gone"
tools:background="@drawable/consultant_expert_search_shixi" />
</LinearLayout>
<TextView
android:id="@+id/tvCity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/platform_dp_4"
android:drawableLeft="@drawable/consult_location_icon"
android:drawablePadding="4dp"
android:gravity="right"
android:textColor="@color/color_62636F"
android:textSize="@dimen/platform_dp_11"
app:layout_constraintBaseline_toBaselineOf="@id/tvName"
app:layout_constraintRight_toRightOf="parent"
tools:text="浙江.杭州" />
<!--咨询师简介--> <!--咨询师简介-->
<TextView <TextView
android:id="@+id/tvTeamCertifications" android:id="@+id/tvTeamCertifications"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tvName"
android:layout_marginLeft="@dimen/platform_dp_12"
android:layout_marginTop="@dimen/platform_dp_4" android:layout_marginTop="@dimen/platform_dp_4"
android:layout_toEndOf="@+id/cvHead"
android:layout_toRightOf="@+id/cvHead"
android:ellipsize="end" android:ellipsize="end"
android:layout_toStartOf="@+id/tvCity"
android:lines="1" android:lines="1"
android:textColor="@color/platform_color_242424" android:textColor="@color/color_1c1f28_60"
android:textSize="@dimen/platform_dp_12" android:textSize="@dimen/platform_dp_12"
app:layout_constraintLeft_toLeftOf="@id/tvName"
app:layout_constraintTop_toBottomOf="@id/tvName"
tools:text="一级婚姻家庭咨询师,二级心理咨询师二级心理咨询师二级心理咨询师" /> tools:text="一级婚姻家庭咨询师,二级心理咨询师二级心理咨询师二级心理咨询师" />
<!--咨询师标签-->
<LinearLayout
android:id="@+id/ll_tags"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/tvName"
android:layout_alignTop="@+id/tvChat"
android:layout_alignBottom="@+id/tvChat"
android:layout_toLeftOf="@+id/tvChat"
android:gravity="center_vertical"
android:orientation="horizontal">
</LinearLayout>
<LinearLayout
android:id="@+id/ll_zixunOrderNum"
android:layout_width="match_parent"
android:layout_height="@dimen/platform_dp_16"
android:layout_below="@+id/tvTeamCertifications"
android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginLeft="@dimen/platform_dp_12"
android:layout_marginTop="@dimen/platform_dp_5"
android:layout_toEndOf="@+id/cvHead"
android:layout_toRightOf="@+id/cvHead"
android:orientation="horizontal">
<!--好评率-->
<LinearLayout
android:id="@+id/ll_feedbackRate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="horizontal" />
<!--61234人点评-->
<TextView
android:id="@+id/tv_zixunOrderNum"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="@dimen/platform_dp_12"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_12"
android:textStyle="bold"
tools:text="61234" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="条评价"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_12" />
</LinearLayout>
<!--帮助人数--> <!--服务时长-->
<TextView
android:id="@+id/tvOrderNumContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/ll_zixunOrderNum"
android:layout_marginStart="@dimen/platform_dp_12"
android:layout_marginLeft="@dimen/platform_dp_12"
android:layout_marginTop="5dp"
android:layout_toRightOf="@+id/cvHead"
android:text="帮助"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_12"
tools:ignore="SpUsage" />
<TextView <TextView
android:id="@+id/tvOrderNum" android:id="@+id/tvSaleDurationForMonth"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_marginLeft="1dp" android:layout_marginLeft="1dp"
android:layout_marginTop="4dp"
android:layout_marginRight="1dp" android:layout_marginRight="1dp"
android:layout_toRightOf="@+id/tvOrderNumContent" android:gravity="center"
android:textColor="@color/platform_color_242424" android:textColor="@color/color_1C1F28"
android:textSize="@dimen/platform_dp_12" android:textSize="@dimen/platform_dp_13"
android:textStyle="bold" app:layout_constraintLeft_toLeftOf="@id/tvName"
tools:ignore="SpUsage" app:layout_constraintTop_toBottomOf="@id/tvTeamCertifications"
tools:text="2648" /> tools:text="134小时" />
<TextView <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_toRightOf="@+id/tvOrderNum"
android:text="人"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_12"
tools:ignore="SpUsage" />
<!--服务时长-->
<TextView
android:id="@+id/tvSaleDurationForMonthContent" android:id="@+id/tvSaleDurationForMonthContent"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvOrderNumContent" android:text="经验"
android:layout_marginLeft="@dimen/platform_dp_20" android:textColor="@color/color_1c1f28_60"
android:layout_toRightOf="@+id/tvOrderNum"
android:text="服务"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_12" android:textSize="@dimen/platform_dp_12"
tools:ignore="SpUsage" /> app:layout_constraintBaseline_toBaselineOf="@id/tvSaleDurationForMonth"
app:layout_constraintLeft_toRightOf="@id/tvSaleDurationForMonth" />
<TextView
android:id="@+id/tvSaleDurationForMonth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvOrderNumContent"
android:layout_marginLeft="1dp"
android:layout_marginRight="1dp"
android:layout_toRightOf="@+id/tvSaleDurationForMonthContent"
android:gravity="center"
android:textColor="@color/platform_color_242424"
android:textSize="@dimen/platform_dp_12"
android:textStyle="bold"
tools:ignore="SpUsage"
tools:text="134" />
<TextView <TextView
android:id="@+id/tv_zixunOrderNum"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvOrderNumContent" android:layout_gravity="center_vertical"
android:layout_toRightOf="@+id/tvSaleDurationForMonth" android:layout_marginStart="@dimen/platform_dp_12"
android:text="小时" android:textColor="@color/color_1C1F28"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_12" android:textSize="@dimen/platform_dp_12"
tools:ignore="SpUsage" /> app:layout_constraintBaseline_toBaselineOf="@id/tvSaleDurationForMonth"
app:layout_constraintLeft_toRightOf="@id/tvSaleDurationForMonthContent"
tools:text="61234条" />
<TextView <TextView
android:id="@+id/people_in_question"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvOrderNumContent" android:layout_gravity="center_vertical"
android:layout_alignParentRight="true" android:text="口碑"
android:textColor="@color/platform_color_FF5040" android:textColor="@color/color_1c1f28_60"
android:textSize="@dimen/platform_dp_12" android:textSize="@dimen/platform_dp_12"
android:visibility="gone" app:layout_constraintBaseline_toBaselineOf="@id/tv_zixunOrderNum"
tools:ignore="SpUsage" app:layout_constraintLeft_toRightOf="@id/tv_zixunOrderNum" />
tools:text="多人在问询"
tools:visibility="visible" />
<TextView <!--咨询师标签-->
android:id="@+id/tv_money_symbol" <LinearLayout
android:id="@+id/ll_tags"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvPrice" android:layout_marginTop="4dp"
android:layout_marginTop="3dp" android:gravity="center_vertical"
android:layout_marginRight="1dp" android:orientation="horizontal"
android:layout_toLeftOf="@+id/tvPrice" app:layout_constraintLeft_toLeftOf="@id/tvName"
android:text="¥" app:layout_constraintTop_toBottomOf="@id/tvSaleDurationForMonth" />
android:textColor="#FF5040"
android:textSize="@dimen/platform_dp_11"
android:textStyle="bold"
tools:ignore="SpUsage" />
<TextView <TextView
android:id="@+id/tvPrice" android:id="@+id/tvPrice"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignTop="@+id/tvName" android:layout_alignTop="@+id/tvName"
android:layout_toLeftOf="@+id/tvPriceContent" android:textColor="@color/color_ef8a4a"
android:fontFamily="@font/platform_din_bold" android:textSize="@dimen/platform_dp_14"
android:textColor="#FF5040" app:layout_constraintLeft_toLeftOf="@id/tvName"
android:textSize="@dimen/platform_dp_20" app:layout_constraintTop_toBottomOf="@id/ll_tags"
tools:text="250" /> tools:text="¥250起" />
<TextView <TextView
android:id="@+id/tvPriceContent" android:id="@+id/attr_combine"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignBottom="@+id/tvPrice" android:layout_marginStart="12dp"
android:layout_alignParentRight="true" android:textColor="@color/color_1c1f28_40"
android:layout_marginLeft="1dp" android:textSize="12dp"
android:layout_marginBottom="2.5dp" app:layout_constraintBaseline_toBaselineOf="@id/tvPrice"
android:text="起" app:layout_constraintLeft_toRightOf="@id/tvPrice"
android:textColor="#FF5040" tools:text="面/视咨询" />
android:textSize="@dimen/platform_dp_11" /> <!--私聊-->
<androidx.cardview.widget.CardView
android:id="@+id/card_chat"
android:layout_width="wrap_content"
android:layout_height="24dp"
android:elevation="0dp"
android:minWidth="56dp"
android:paddingLeft="6dp"
android:paddingTop="4dp"
android:paddingRight="6dp"
android:paddingBottom="4dp"
app:cardBackgroundColor="@color/color_6ec8f9"
app:cardCornerRadius="12dp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/tvPrice">
<TextView
android:id="@+id/tvChat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="私 聊"
android:textColor="@color/white"
android:textSize="@dimen/platform_dp_11"
app:layout_constraintBaseline_toBaselineOf="@id/tvPrice"
app:layout_constraintRight_toRightOf="parent" />
</androidx.cardview.widget.CardView>
<TextView
android:id="@+id/tvCity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tvName"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/platform_dp_4"
android:gravity="right"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_12"
tools:text="浙江.杭州" />
<!--<View-->
<!--android:id="@+id/vLine"-->
<!--android:layout_below="@+id/tvPrice"-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="2dp"-->
<!--android:layout_marginLeft="104dp"-->
<!--android:layout_marginStart="104dp"-->
<!--android:layout_marginTop="7dp"-->
<!--android:layerType="software"-->
<!--android:background="@drawable/expert_search_dash_line" />-->
<!--服务套餐-->
<LinearLayout
android:id="@+id/ll_products"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="104dp"
android:layout_marginLeft="104dp"
android:layout_marginTop="@dimen/platform_dp_5"
android:orientation="vertical"
android:visibility="gone">
</LinearLayout>
<!--私聊-->
<TextView <TextView
android:id="@+id/tvChat" android:id="@+id/people_in_question"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="@dimen/platform_dp_24"
android:layout_alignBottom="@+id/cvHead"
android:layout_alignParentRight="true"
android:gravity="center"
android:textSize="@dimen/platform_dp_13"
android:textStyle="bold"
android:background="@drawable/consultant_expert_search_chat"
android:textColor="@color/platform_but_text_color"
android:text="私聊"/>
<!--描述-->
<RelativeLayout
android:id="@+id/group_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/tvChat" android:layout_marginTop="4dp"
android:layout_marginLeft="@dimen/platform_dp_15" android:textColor="@color/color_62636F"
android:layout_marginTop="@dimen/platform_dp_10" android:textSize="@dimen/platform_dp_10"
android:layout_toRightOf="@+id/cvHead" android:visibility="gone"
android:background="@drawable/consultant_bg_radius_gray_2" app:layout_constraintRight_toRightOf="parent"
android:visibility="gone"> app:layout_constraintTop_toBottomOf="@id/card_chat"
tools:text="多人在问询"
tools:visibility="visible" />
<ImageView <View
android:layout_width="12dp" android:layout_width="0dp"
android:layout_height="11dp" android:layout_height="1px"
android:layout_marginLeft="@dimen/platform_dp_8" android:background="@color/color_EFEFF1"
android:layout_marginTop="@dimen/platform_dp_6" android:layout_marginTop="20dp"
android:src="@drawable/consultant_bg_item_desc" /> app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toLeftOf="@id/cv_head_view"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/people_in_question" />
<TextView
android:id="@+id/tvDesc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="12dp"
android:layout_marginTop="8dp"
android:layout_marginRight="12dp"
android:layout_marginBottom="8dp"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/platform_color_999999"
android:textSize="@dimen/platform_dp_11"
tools:text="的客人能够黄偶尔烦人呢日工俄日给你额鞥你让个汇入你哦个人会儿个黄胡蓉呢你个人给哦 而归黑人更换二给" />
</RelativeLayout>
</RelativeLayout> </androidx.constraintlayout.widget.ConstraintLayout>
...@@ -26,5 +26,12 @@ ...@@ -26,5 +26,12 @@
<color name="consultant_colorBg">#f5f5f5</color> <color name="consultant_colorBg">#f5f5f5</color>
<color name="color_EB892C">#EB892C</color> <color name="color_EB892C">#EB892C</color>
<color name="color_1AEB892C">#1AEB892C</color> <color name="color_1AEB892C">#1AEB892C</color>
<color name="color_1c1f28_60">#a61c1f28</color>
<color name="color_1c1f28_40">#661c1f28</color>
<color name="color_ef8a4a">#EF8A4A</color>
<color name="color_f6f6f7">#f6f6f7</color>
<color name="color_6ec8f9">#6ec8f9</color>
<color name="color_b6bece">#B6BECE</color>
<color name="color_f5a082">#F5A082</color>
<color name="color_f28e6b">#F28E6B</color>
</resources> </resources>
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