Commit 2a4f7cd1 by 霍志良

feat:BUG修改

parent 55608d82
......@@ -123,6 +123,7 @@ class FilterPopupWindow(
@SuppressLint("UseCompatLoadingForDrawables")
private fun initShowSortViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize
view.flSortType.removeAllViews()
for ((index, enquiry) in sortItems.withIndex()) {
val llTextView =
View.inflate(context, R.layout.consultant_item_filter, null) as TextView
......@@ -180,6 +181,7 @@ class FilterPopupWindow(
tempFilter.showType = filterData.showType[0]
tempFilter.ages.clear()
tempFilter.doctorEdu.clear()
tempFilter.reorder = ReorderItem()
// 擅长人群
tempFilter.specialityCrowd.clear()
tempFilter.others.clear()
......@@ -230,6 +232,19 @@ class FilterPopupWindow(
v.paint.isFakeBoldText = false
}
}
initZiZhiViews(contentView)
initOtherViews(contentView)
initShowSortViews(contentView)
initShowTypeViews(contentView)
//咨询方式
initEnquiryViews(contentView)
//年龄选择
initAgeViews(contentView)
//擅长人群
initGoodAtCrowd(contentView)
//学历选择
initEduViews(contentView)
updateCount(ConsultBIConstants.POSITION_CONSULT_FILTER_RESET_CLICK)
}
......@@ -366,6 +381,7 @@ class FilterPopupWindow(
* */
private fun initOtherViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize
view.flOther.removeAllViews()
for ((index, other) in filterData.other.withIndex()) {
val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView
val params = FrameLayout.LayoutParams(mWidth, dp36)
......@@ -413,6 +429,7 @@ class FilterPopupWindow(
* */
private fun initZiZhiViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(40f)) / 2
view.flZhizi.removeAllViews()
for (other in filterData.title) {
val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView
val params = FrameLayout.LayoutParams(mWidth, dp36)
......@@ -429,7 +446,6 @@ class FilterPopupWindow(
}
textView.tvFilterName.text = " " + other.value + " "
textView.setOnClickListener {
if (textView.isSelected) {
tempFilter.title.remove(other)
textView.isSelected = false
......@@ -454,6 +470,7 @@ class FilterPopupWindow(
*/
private fun initGoodAtCrowd(view: View) {
// 如果标标签数量大于20,取前20个默认展示
view.fl_crowd.removeAllViews()
if (filterData.specialityCrowd.size > 20) {
view.ll_crowd_more.visibility = View.VISIBLE
view.ll_crowd_more.setOnClickListener {
......@@ -520,6 +537,7 @@ class FilterPopupWindow(
* */
private fun initAgeViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize
view.flAge.removeAllViews()
for ((index, age) in filterData.age.withIndex()) {
val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView
val params = FrameLayout.LayoutParams(mWidth, RxImageTool.dp2px(36f))
......@@ -567,6 +585,7 @@ class FilterPopupWindow(
* */
private fun initEduViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize
view.fl_edu.removeAllViews()
for ((index, edu) in filterData.doctorEdu.withIndex()) {
val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView
val params = FrameLayout.LayoutParams(mWidth, RxImageTool.dp2px(36f))
......@@ -611,6 +630,7 @@ class FilterPopupWindow(
private fun initEnquiryViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(52f)) / enquirySize
view.flEnquiryType.removeAllViews()
for ((index, enquiry) in filterData.enquiry.withIndex()) {
val llLayout = View.inflate(context, R.layout.consultant_method_item_filter, null)
val textView: TextView = llLayout.findViewById(R.id.tvFilterName)
......@@ -668,6 +688,7 @@ class FilterPopupWindow(
private fun initShowTypeViews(view: View) {
val mWidth = (popWidth - RxImageTool.dp2px(42f)) / 2
view.flShowType.removeAllViews()
for ((index, showType) in filterData.showType.withIndex()) {
val textView = View.inflate(context, R.layout.consultant_item_filter, null) as TextView
val params = FrameLayout.LayoutParams(mWidth, dp36)
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="MissingDefaultResource">
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<androidx.recyclerview.widget.RecyclerView
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
\ No newline at end of file
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