Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
2a4f7cd1
Commit
2a4f7cd1
authored
Aug 15, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:BUG修改
parent
55608d82
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
FilterPopupWindow.kt
m-consultant/src/main/java/com/yidianling/consultant/ui/view/FilterPopupWindow.kt
+22
-1
consultant_layout_category_view.xml
m-consultant/src/main/res/layout/consultant_layout_category_view.xml
+8
-3
No files found.
m-consultant/src/main/java/com/yidianling/consultant/ui/view/FilterPopupWindow.kt
View file @
2a4f7cd1
...
...
@@ -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
)
...
...
m-consultant/src/main/res/layout/consultant_layout_category_view.xml
View file @
2a4f7cd1
<?xml version="1.0" encoding="utf-8"?>
<
androidx.constraintlayout.widget.Constraint
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Linear
Layout
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment