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
a82638ea
Commit
a82638ea
authored
Aug 04, 2022
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:部分修改
parent
725a4ed9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
106 additions
and
18 deletions
+106
-18
ExpertSearchActivity.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
+51
-8
ExpertSearchFragment.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
+51
-9
AllFilter.kt
m-consultant/src/main/java/com/yidianling/consultant/model/bean/AllFilter.kt
+2
-1
FilterPopupWindow.kt
m-consultant/src/main/java/com/yidianling/consultant/ui/view/FilterPopupWindow.kt
+2
-0
filter_up_grey.png
m-consultant/src/main/res/drawable-xxhdpi/filter_up_grey.png
+0
-0
No files found.
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
View file @
a82638ea
...
...
@@ -1086,6 +1086,9 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
tempFilter
.
showType
=
allFilter
.
showType
tempFilter
.
ages
.
clear
()
tempFilter
.
ages
.
addAll
(
allFilter
.
ages
)
//排序
tempFilter
.
sorStyle
.
clear
()
tempFilter
.
sorStyle
.
addAll
(
allFilter
.
sorStyle
)
//学历
tempFilter
.
doctorEdu
.
clear
()
tempFilter
.
doctorEdu
.
addAll
(
allFilter
.
doctorEdu
)
...
...
@@ -1105,13 +1108,13 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
filterPopupWindow
.
setOnDismissListener
{
viewDim
.
visibility
=
View
.
INVISIBLE
viewDim_filter
.
visibility
=
View
.
GONE
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
doctorEdu
.
size
+
allFilter
.
title
.
size
>
0
||
!
TextUtils
.
isEmpty
(
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
sorStyle
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
doctorEdu
.
size
+
allFilter
.
title
.
size
>
0
||
!
TextUtils
.
isEmpty
(
allFilter
.
priceRanges
?.
min_price
)
||
!
TextUtils
.
isEmpty
(
allFilter
.
priceRanges
?.
max_price
)
)
{
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_FILTERED
)
updateFilter
Right
TextViewStatus
(
tvFilter
,
FILTER_STATUS_FILTERED
)
}
else
{
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_NORMAL
)
updateFilter
Right
TextViewStatus
(
tvFilter
,
FILTER_STATUS_NORMAL
)
}
ConsultAssistantDialogUtils
.
INSTANCE
.
fitRequest
(
this
,
"doctor_list"
,
true
)
}
...
...
@@ -1119,7 +1122,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
filterPopupWindow
.
showAsDropDown
(
viewSep2
)
ConsultAssistantDialogUtils
.
INSTANCE
.
hideAssistantActivity
()
filterPopupWindow
.
onFilterConfirmListener
=
this
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_OPEN
)
updateFilter
Right
TextViewStatus
(
tvFilter
,
FILTER_STATUS_OPEN
)
viewDim
.
visibility
=
View
.
VISIBLE
}
else
{
ToastUtil
.
toastShort
(
"数据初始化失败,请重试"
)
...
...
@@ -1165,6 +1168,10 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
allFilter
.
enquiries
.
addAll
(
tempFilter
.
enquiries
)
allFilter
.
ages
.
clear
()
allFilter
.
ages
.
addAll
(
tempFilter
.
ages
)
//排序
allFilter
.
sorStyle
.
clear
()
allFilter
.
sorStyle
.
addAll
(
tempFilter
.
sorStyle
)
//学历
allFilter
.
doctorEdu
.
clear
()
allFilter
.
doctorEdu
.
addAll
(
tempFilter
.
doctorEdu
)
...
...
@@ -1417,7 +1424,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
updateFilterTextViewStatus
(
tvArea
,
FILTER_STATUS_OPEN
)
regionPopupWindow
.
setOnDismissListener
{
viewDim
.
visibility
=
View
.
INVISIBLE
if
(
tvArea
.
text
!=
"
地区
"
)
{
if
(
tvArea
.
text
!=
"
城市
"
)
{
updateFilterTextViewStatus
(
tvArea
,
FILTER_STATUS_FILTERED
)
}
else
{
updateFilterTextViewStatus
(
tvArea
,
FILTER_STATUS_NORMAL
)
...
...
@@ -1430,7 +1437,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
allFilter
.
region
=
region
allFilter
.
sub
=
sub
if
(
TextUtils
.
isEmpty
(
region
.
code
)
&&
TextUtils
.
isEmpty
(
sub
.
code
))
{
tvArea
.
text
=
"
地区
"
tvArea
.
text
=
"
城市
"
}
else
if
(!
TextUtils
.
isEmpty
(
region
.
code
)
&&
!
TextUtils
.
isEmpty
(
sub
.
code
))
{
if
(
region
.
value
?.
length
?:
0
>
4
)
{
tvArea
.
text
=
region
.
value
?.
substring
(
0
,
3
)
+
"..."
...
...
@@ -1557,6 +1564,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
allFilter
.
sub
=
SubItem
()
allFilter
.
enquiries
.
clear
()
allFilter
.
ages
.
clear
()
allFilter
.
sorStyle
.
clear
()
allFilter
.
doctorEdu
.
clear
()
allFilter
.
others
.
clear
()
updateFilterTextViewStatus
(
tvSubject
,
FILTER_STATUS_NORMAL
)
...
...
@@ -1572,11 +1580,46 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
}
}
//设置筛选点击按钮状态
private
fun
updateFilterTextViewStatus
(
tv
:
TextView
,
status
:
Int
)
{
when
(
status
)
{
FILTER_STATUS_NORMAL
->
{
tv
.
typeface
=
Typeface
.
defaultFromStyle
(
Typeface
.
NORMAL
)
tv
.
setTextColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
platform_colorTextDefault
))
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
R
.
drawable
.
platform_ic_arrow_drop_down_grey_500_18dp
,
0
)
}
FILTER_STATUS_FILTERED
->
{
tv
.
typeface
=
Typeface
.
DEFAULT_BOLD
tv
.
setTextColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
platform_main_theme
))
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
R
.
drawable
.
platform_ic_arrow_drop_down_grey_500_18dp
,
0
)
}
FILTER_STATUS_OPEN
->
{
tv
.
typeface
=
Typeface
.
DEFAULT_BOLD
tv
.
setTextColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
platform_colorTextDefault
))
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
R
.
drawable
.
platform_arrow_drop_down_en
,
0
)
}
}
}
//设置筛选点击按钮状态
private
fun
updateFilterRightTextViewStatus
(
tv
:
TextView
,
status
:
Int
)
{
when
(
status
)
{
FILTER_STATUS_NORMAL
->
{
tv
.
typeface
=
Typeface
.
defaultFromStyle
(
Typeface
.
NORMAL
)
tv
.
setTextColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
platform_colorTextDefault
))
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
...
...
@@ -1591,7 +1634,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
R
.
drawable
.
filter_
up_grey
,
R
.
drawable
.
filter_
down_blue
,
0
)
}
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
View file @
a82638ea
...
...
@@ -566,7 +566,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
hasSelectedArea
=
true
}
else
{
allFilter
.
region
=
RegionItem
()
tvArea
.
text
=
"
地区
"
tvArea
.
text
=
"
城市
"
updateFilterTextViewStatus
(
tvArea
,
FILTER_STATUS_NORMAL
)
hasSelectedArea
=
false
...
...
@@ -730,7 +730,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
allFilter
.
region
=
RegionItem
()
allFilter
.
sub
=
SubItem
(
"不限"
,
null
)
tvArea
.
text
=
"
地区
"
tvArea
.
text
=
"
城市
"
updateFilterTextViewStatus
(
tvArea
,
FILTER_STATUS_NORMAL
)
hasSelectedArea
=
false
...
...
@@ -991,6 +991,9 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
tempFilter
.
showType
=
allFilter
.
showType
tempFilter
.
ages
.
clear
()
tempFilter
.
ages
.
addAll
(
allFilter
.
ages
)
//排序
tempFilter
.
sorStyle
.
clear
()
tempFilter
.
sorStyle
.
addAll
(
allFilter
.
sorStyle
)
//学历
tempFilter
.
doctorEdu
.
clear
()
tempFilter
.
doctorEdu
.
addAll
(
allFilter
.
doctorEdu
)
...
...
@@ -1010,13 +1013,13 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
filterPopupWindow
.
setOnDismissListener
{
viewDim
.
visibility
=
View
.
INVISIBLE
viewDim_filter
.
visibility
=
View
.
GONE
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
doctorEdu
.
size
+
allFilter
.
title
.
size
+
allFilter
.
specialityCrowd
.
size
>
0
||
!
TextUtils
.
isEmpty
(
if
(
allFilter
.
others
.
size
+
allFilter
.
enquiries
.
size
+
allFilter
.
sorStyle
.
size
+
allFilter
.
ages
.
size
+
allFilter
.
doctorEdu
.
size
+
allFilter
.
title
.
size
+
allFilter
.
specialityCrowd
.
size
>
0
||
!
TextUtils
.
isEmpty
(
allFilter
.
priceRanges
?.
min_price
)
||
!
TextUtils
.
isEmpty
(
allFilter
.
priceRanges
?.
max_price
)
)
{
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_FILTERED
)
updateFilter
Right
TextViewStatus
(
tvFilter
,
FILTER_STATUS_FILTERED
)
}
else
{
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_NORMAL
)
updateFilter
Right
TextViewStatus
(
tvFilter
,
FILTER_STATUS_NORMAL
)
}
showConsultAssistantDialog
()
}
...
...
@@ -1024,7 +1027,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
filterPopupWindow
.
showAsDropDown
(
viewSep2
)
hideConsultAssistantDialog
()
filterPopupWindow
.
onFilterConfirmListener
=
this
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_OPEN
)
updateFilter
Right
TextViewStatus
(
tvFilter
,
FILTER_STATUS_OPEN
)
viewDim
.
visibility
=
View
.
VISIBLE
}
else
{
ToastUtil
.
toastShort
(
"数据初始化失败,请重试"
)
...
...
@@ -1062,6 +1065,10 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
allFilter
.
showType
=
tempFilter
.
showType
allFilter
.
enquiries
.
clear
()
allFilter
.
enquiries
.
addAll
(
tempFilter
.
enquiries
)
//排序
allFilter
.
sorStyle
.
clear
()
allFilter
.
sorStyle
.
addAll
(
tempFilter
.
sorStyle
)
allFilter
.
ages
.
clear
()
allFilter
.
ages
.
addAll
(
tempFilter
.
ages
)
allFilter
.
doctorEdu
.
clear
()
...
...
@@ -1298,7 +1305,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
updateFilterTextViewStatus
(
tvArea
,
FILTER_STATUS_OPEN
)
regionPopupWindow
.
setOnDismissListener
{
viewDim
.
visibility
=
View
.
INVISIBLE
if
(
tvArea
.
text
!=
"
地区
"
)
{
if
(
tvArea
.
text
!=
"
城市
"
)
{
updateFilterTextViewStatus
(
tvArea
,
FILTER_STATUS_FILTERED
)
}
else
{
updateFilterTextViewStatus
(
tvArea
,
FILTER_STATUS_NORMAL
)
...
...
@@ -1311,7 +1318,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
allFilter
.
region
=
region
allFilter
.
sub
=
sub
if
(
TextUtils
.
isEmpty
(
region
.
code
)
&&
TextUtils
.
isEmpty
(
sub
.
code
))
{
tvArea
.
text
=
"
地区
"
tvArea
.
text
=
"
城市
"
}
else
if
(!
TextUtils
.
isEmpty
(
region
.
code
)
&&
!
TextUtils
.
isEmpty
(
sub
.
code
))
{
if
(
region
.
value
?.
length
?:
0
>
4
)
{
tvArea
.
text
=
region
.
value
?.
substring
(
0
,
3
)
+
"..."
...
...
@@ -1455,7 +1462,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
rvExperts
.
scrollToPosition
(
0
)
}
//设置筛选点击按钮状态
private
fun
updateFilterTextViewStatus
(
tv
:
TextView
,
status
:
Int
)
{
when
(
status
)
{
FILTER_STATUS_NORMAL
->
{
...
...
@@ -1464,6 +1470,42 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
R
.
drawable
.
platform_ic_arrow_drop_down_grey_500_18dp
,
0
)
}
FILTER_STATUS_FILTERED
->
{
tv
.
typeface
=
Typeface
.
DEFAULT_BOLD
tv
.
setTextColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
platform_main_theme
))
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
R
.
drawable
.
platform_ic_arrow_drop_down_grey_500_18dp
,
0
)
}
FILTER_STATUS_OPEN
->
{
tv
.
typeface
=
Typeface
.
DEFAULT_BOLD
tv
.
setTextColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
platform_colorTextDefault
))
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
R
.
drawable
.
platform_arrow_drop_down_en
,
0
)
}
}
}
//设置筛选点击按钮状态
private
fun
updateFilterRightTextViewStatus
(
tv
:
TextView
,
status
:
Int
)
{
when
(
status
)
{
FILTER_STATUS_NORMAL
->
{
tv
.
typeface
=
Typeface
.
defaultFromStyle
(
Typeface
.
NORMAL
)
tv
.
setTextColor
(
ContextCompat
.
getColor
(
mContext
,
R
.
color
.
platform_colorTextDefault
))
tv
.
setCompoundDrawablesWithIntrinsicBounds
(
0
,
0
,
R
.
drawable
.
filter_up_grey
,
0
)
...
...
m-consultant/src/main/java/com/yidianling/consultant/model/bean/AllFilter.kt
View file @
a82638ea
...
...
@@ -20,6 +20,7 @@ data class AllFilter(
var
priceRangesView
:
TextView
?
=
null
,
//服务均价
var
sortRangesView
:
TextView
?
=
null
,
//排序均价
val
ages
:
ArrayList
<
AgeItem
>
=
ArrayList
(),
//年龄
val
sorStyle
:
ArrayList
<
ReorderItem
>
=
ArrayList
(),
//排序方式
val
doctorEdu
:
ArrayList
<
DoctorEduItem
>
=
ArrayList
(),
//学历
val
others
:
ArrayList
<
OtherItem
>
=
ArrayList
(),
//其他筛选
...
...
@@ -29,7 +30,7 @@ data class AllFilter(
// 八大类标签集合
val
childList
:
ArrayList
<
ChildrenBean
>
=
ArrayList
(),
// 亲子教育
val
stressList
:
ArrayList
<
ChildrenBean
>
=
ArrayList
(),
// 情绪压力
val
loveEmotionList
:
ArrayList
<
ChildrenBean
>
=
ArrayList
(),
// 恋爱情感
val
loveEmotionList
:
ArrayList
<
ChildrenBean
>
=
ArrayList
(),
// 恋爱情感
val
marriedFamilyList
:
ArrayList
<
ChildrenBean
>
=
ArrayList
(),
// 婚姻家庭
val
personalGrowthList
:
ArrayList
<
ChildrenBean
>
=
ArrayList
(),
// 个人成长
val
interpersonalRelationshipList
:
ArrayList
<
ChildrenBean
>
=
ArrayList
(),
// 人际关系
...
...
m-consultant/src/main/java/com/yidianling/consultant/ui/view/FilterPopupWindow.kt
View file @
a82638ea
...
...
@@ -154,6 +154,7 @@ class FilterPopupWindow(
tempFilter
.
sortRangesView
?.
paint
?.
isFakeBoldText
=
false
}
if
(
llTextView
.
isSelected
)
{
tempFilter
.
sorStyle
.
remove
(
enquiry
)
tempFilter
.
priceRanges
=
null
llTextView
.
isSelected
=
false
llTextView
.
background
=
...
...
@@ -161,6 +162,7 @@ class FilterPopupWindow(
llTextView
.
paint
.
isFakeBoldText
=
false
tempFilter
.
sortRangesView
=
null
}
else
{
tempFilter
.
sorStyle
.
add
(
enquiry
)
llTextView
.
isSelected
=
true
llTextView
.
background
=
context
.
resources
.
getDrawable
(
R
.
drawable
.
consult_filter_four_selected
)
...
...
m-consultant/src/main/res/drawable-xxhdpi/filter_up_grey.png
View replaced file @
725a4ed9
View file @
a82638ea
1009 Bytes
|
W:
|
H:
678 Bytes
|
W:
|
H:
2-up
Swipe
Onion skin
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