Commit 99e39eac by 霍志良

feat:UI修改

parent 2cc79821
......@@ -121,6 +121,7 @@ class FilterPopupWindow(
}
}
@SuppressLint("UseCompatLoadingForDrawables")
private fun initShowSortViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize
for ((index, enquiry) in sortItems.withIndex()) {
......@@ -140,21 +141,29 @@ class FilterPopupWindow(
sortRangeViews.add(llTextView)
if (enquiry == tempFilter.reorder) {
llTextView.isSelected = true
llTextView.background =
context.resources.getDrawable(R.drawable.consult_filter_four_selected)
llTextView.paint.isFakeBoldText = true
tempFilter.priceRangesView = llTextView
}
llTextView.setOnClickListener {
if (llTextView != tempFilter.sortRangesView) {
tempFilter.sortRangesView?.isSelected = false
tempFilter.sortRangesView?.background =
context.resources.getDrawable(R.drawable.consult_price_expert_unseleted)
tempFilter.sortRangesView?.paint?.isFakeBoldText = false
}
if (llTextView.isSelected) {
tempFilter.priceRanges = null
llTextView.isSelected = false
llTextView.background =
context.resources.getDrawable(R.drawable.consult_price_expert_unseleted)
llTextView.paint.isFakeBoldText = false
tempFilter.sortRangesView = null
} else {
llTextView.isSelected = true
llTextView.background =
context.resources.getDrawable(R.drawable.consult_filter_four_selected)
llTextView.paint.isFakeBoldText = true
tempFilter.sortRangesView = llTextView
tempFilter.reorder = sortItems[index]
......@@ -406,6 +415,8 @@ class FilterPopupWindow(
if (tempFilter.others.contains(other)) {
textView.isSelected = true
textView.paint.isFakeBoldText = true
textView.background =
context.resources.getDrawable(R.drawable.consult_filter_four_selected)
}
textView.tvFilterName.text = " " + other.value + " "
textView.setOnClickListener {
......@@ -414,10 +425,14 @@ class FilterPopupWindow(
tempFilter.others.remove(other)
textView.isSelected = false
textView.paint.isFakeBoldText = false
textView.background =
context.resources.getDrawable(R.drawable.consult_price_expert_unseleted)
} else {
tempFilter.others.add(other)
textView.isSelected = true
textView.paint.isFakeBoldText = true
textView.background =
context.resources.getDrawable(R.drawable.consult_filter_four_selected)
}
updateCount(ConsultBIConstants.POSITION_OTHER_CHOICE_CLICK)
}
......@@ -441,6 +456,8 @@ class FilterPopupWindow(
if (tempFilter.title.contains(other)) {
textView.isSelected = true
textView.paint.isFakeBoldText = true
textView.background =
context.resources.getDrawable(R.drawable.consultant_filter_expert_two_selected)
}
textView.tvFilterName.text = " " + other.value + " "
textView.setOnClickListener {
......@@ -449,10 +466,14 @@ class FilterPopupWindow(
tempFilter.title.remove(other)
textView.isSelected = false
textView.paint.isFakeBoldText = false
textView.background =
context.resources.getDrawable(R.drawable.consult_price_expert_unseleted)
} else {
tempFilter.title.add(other)
textView.isSelected = true
textView.paint.isFakeBoldText = true
textView.background =
context.resources.getDrawable(R.drawable.consultant_filter_expert_two_selected)
}
updateCount(ConsultBIConstants.POSITION_QUALIFICATION_CHOICE_CLICK)
}
......@@ -496,6 +517,8 @@ class FilterPopupWindow(
if (tempFilter.specialityCrowd.contains(item)) {
textView.isSelected = true
textView.paint.isFakeBoldText = true
textView.background =
context.resources.getDrawable(R.drawable.consult_filter_four_selected)
}
textView.tvFilterName.text = " " + item.value + " "
textView.setOnClickListener {
......@@ -504,10 +527,14 @@ class FilterPopupWindow(
tempFilter.specialityCrowd.remove(item)
textView.isSelected = false
textView.paint.isFakeBoldText = false
textView.background =
context.resources.getDrawable(R.drawable.consult_price_expert_unseleted)
} else {
tempFilter.specialityCrowd.add(item)
textView.isSelected = true
textView.paint.isFakeBoldText = true
textView.background =
context.resources.getDrawable(R.drawable.consult_filter_four_selected)
}
}
......@@ -542,6 +569,8 @@ class FilterPopupWindow(
if (tempFilter.ages.contains(age)) {
textView.isSelected = true
textView.paint.isFakeBoldText = true
textView.background =
context.resources.getDrawable(R.drawable.consult_filter_four_selected)
}
textView.text = " " + age.value + " "
textView.setOnClickListener {
......@@ -550,10 +579,14 @@ class FilterPopupWindow(
tempFilter.ages.remove(age)
textView.isSelected = false
textView.paint.isFakeBoldText = false
textView.background =
context.resources.getDrawable(R.drawable.consult_price_expert_unseleted)
} else {
tempFilter.ages.add(age)
textView.isSelected = true
textView.paint.isFakeBoldText = true
textView.background =
context.resources.getDrawable(R.drawable.consult_filter_four_selected)
}
updateCount(ConsultBIConstants.POSITION_AGE_CHOICE_CLICK)
}
......@@ -583,6 +616,8 @@ class FilterPopupWindow(
if (tempFilter.doctorEdu.contains(edu)) {
textView.isSelected = true
textView.paint.isFakeBoldText = true
textView.background =
context.resources.getDrawable(R.drawable.consult_filter_four_selected)
}
textView.text = " " + edu.value + " "
textView.setOnClickListener {
......@@ -591,10 +626,14 @@ class FilterPopupWindow(
tempFilter.doctorEdu.remove(edu)
textView.isSelected = false
textView.paint.isFakeBoldText = false
textView.background =
context.resources.getDrawable(R.drawable.consult_price_expert_unseleted)
} else {
tempFilter.doctorEdu.add(edu)
textView.isSelected = true
textView.paint.isFakeBoldText = true
textView.background =
context.resources.getDrawable(R.drawable.consult_filter_four_selected)
}
updateCount(ConsultBIConstants.POSITION_EDU_CHOICE_CLICK)
}
......@@ -629,6 +668,8 @@ class FilterPopupWindow(
Glide.with(context)
.load(enquiry.check_url)
.into(ivIcon)
llLayout.background =
context.resources.getDrawable(R.drawable.consult_filter_four_selected)
}
llLayout.setOnClickListener {
if (llLayout.isSelected) {
......@@ -638,6 +679,8 @@ class FilterPopupWindow(
Glide.with(context)
.load(enquiry.un_check_url)
.into(ivIcon)
llLayout.background =
context.resources.getDrawable(R.drawable.consult_price_expert_unseleted)
} else {
tempFilter.enquiries.add(enquiry)
llLayout.isSelected = true
......@@ -645,6 +688,8 @@ class FilterPopupWindow(
Glide.with(context)
.load(enquiry.check_url)
.into(ivIcon)
llLayout.background =
context.resources.getDrawable(R.drawable.consult_filter_four_selected)
}
updateCount(ConsultBIConstants.POSITION_CONSULT_TYPE_CLICK)
}
......
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