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
a039c65c
Commit
a039c65c
authored
May 28, 2022
by
upwork.021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 代码优化
parent
de7e6896
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
32 deletions
+17
-32
ExpertSearchActivity.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
+7
-9
ExpertSearchFragment.kt
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
+3
-16
YdlHomeAdapter.kt
m-home/src/ydl/java/com/yidianling/home/adapter/YdlHomeAdapter.kt
+3
-3
YdlHomeFragment.kt
m-home/src/ydl/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
+1
-1
HomeButtonBannerView.kt
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
+3
-3
No files found.
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchActivity.kt
View file @
a039c65c
...
...
@@ -901,7 +901,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
appbar_layout
.
setExpanded
(
false
)
appbar_layout
.
postDelayed
({
showSubjectPopupWindow
()
},
300
)
;
},
300
)
}
R
.
id
.
tvArea
->
{
...
...
@@ -910,7 +910,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
appbar_layout
.
setExpanded
(
false
)
appbar_layout
.
postDelayed
({
showAreaPopupWindow
()
},
300
)
;
},
300
)
}
R
.
id
.
tvSort
->
{
...
...
@@ -919,7 +919,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
appbar_layout
.
setExpanded
(
false
)
appbar_layout
.
postDelayed
({
showSortPopupWindow
()
},
300
)
;
},
300
)
}
R
.
id
.
tvFilter
->
{
...
...
@@ -928,7 +928,7 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
appbar_layout
.
setExpanded
(
false
)
appbar_layout
.
postDelayed
({
showFilterPopupWindow
()
},
300
)
;
},
300
)
}
R
.
id
.
tv_guide
->
{
...
...
@@ -964,7 +964,6 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
//显示筛选弹窗
private
fun
showFilterPopupWindow
()
{
// tempFilter.searchWord = etSearch.text.toString()
tempFilter
.
categories
.
clear
()
tempFilter
.
categories
.
addAll
(
allFilter
.
categories
)
tempFilter
.
reorder
=
allFilter
.
reorder
...
...
@@ -1003,11 +1002,10 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
ConsultAssistantDialogUtils
.
INSTANCE
.
fitRequest
(
this
,
"doctor_list"
,
true
)
}
filterPopupWindow
.
isClippingEnabled
=
false
filterPopupWindow
.
showA
tLocation
(
viewSep2
.
rootView
,
Gravity
.
TOP
+
Gravity
.
RIGHT
,
0
,
0
)
filterPopupWindow
.
showA
sDropDown
(
viewSep2
)
ConsultAssistantDialogUtils
.
INSTANCE
.
hideAssistantActivity
()
filterPopupWindow
.
onFilterConfirmListener
=
this
updateFilterTextViewStatus
(
tvFilter
,
FILTER_STATUS_OPEN
)
// viewDim.visibility = View.VISIBLE
viewDim_filter
.
visibility
=
View
.
VISIBLE
}
else
{
ToastUtil
.
toastShort
(
"数据初始化失败,请重试"
)
...
...
@@ -1359,12 +1357,12 @@ class ExpertSearchActivity : BaseMvpActivity<IExpertSearchView, ExpertSearchPres
}
ConsultAssistantDialogUtils
.
INSTANCE
.
hideAssistantActivity
()
categoryPopup
!!
.
onSubjectsSelectedListener
=
this
categoryPopup
!!
.
showAsDropDown
(
viewSep2
)
categoryPopup
!!
.
showAsDropDown
(
tvFilter
)
updateFilterTextViewStatus
(
tvSubject
,
FILTER_STATUS_OPEN
)
viewDim
.
visibility
=
View
.
VISIBLE
}
else
{
ConsultAssistantDialogUtils
.
INSTANCE
.
hideAssistantActivity
()
categoryPopup
!!
.
showAsDropDown
(
viewSep2
)
categoryPopup
!!
.
showAsDropDown
(
tvFilter
)
updateFilterTextViewStatus
(
tvSubject
,
FILTER_STATUS_OPEN
)
viewDim
.
visibility
=
View
.
VISIBLE
}
...
...
m-consultant/src/main/java/com/yidianling/consultant/ExpertSearchFragment.kt
View file @
a039c65c
...
...
@@ -123,10 +123,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
YDLImageCacheManager
.
showImage
(
activity
,
url
,
imgView
,
width
,
heigh
,
ops
)
}
}
//
// override fun getStatusViewOptions(): StatusBarOptions {
// return StatusBarOptions(true,true)
// }
companion
object
{
const
val
EXTRA_CATEGORY
=
"category"
...
...
@@ -149,20 +145,14 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
private
val
allFilter
=
AllFilter
()
//当前筛选
private
val
tempFilter
=
AllFilter
()
//临时筛选,未确认状态
private
val
doctorList
=
ArrayList
<
ExpertServiceItem
>()
private
val
serviceList
=
ArrayList
<
ExpertServiceItem
>()
private
var
hasMore
=
true
private
var
initCategory
=
"0"
private
var
initShowType
:
Int
=
0
private
lateinit
var
doctorAdapter
:
ExpertSearchAdapter
private
lateinit
var
onScrollListener
:
EndlessRecyclerViewScrollListener
private
var
headData
:
HeadData
?
=
null
//筛选数据
private
val
props1
=
JSONObject
()
//筛选标题埋点参数
private
var
fromPageType
:
Int
=
0
//从哪个页面跳转过来的
private
val
fromPages
=
arrayOf
(
"首页"
,
"搜索页面"
,
"在线专家"
)
private
var
isRecommend
=
false
//埋点数据
private
var
keyWord
:
String
?
=
null
//埋点数据
private
var
isDoSearch
:
Boolean
=
false
//埋点判断是否通过搜索进入埋点的
// private val bannerList = ArrayList<String>()
private
var
hasSelectedArea
=
false
//是否选择过地区
private
var
hasSelectedSort
=
false
//是否选择过排序
...
...
@@ -287,7 +277,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
}
}
}
// rvExperts.addItemDecoration(ExpertItemDecoration(this))
rvExperts
.
addOnScrollListener
(
onScrollListener
)
rvExperts
.
addOnScrollListener
(
YDLImageRecyclerOnScrollListener
(
activity
))
// etSearch.addTextChangedListener(object : TextWatcher {
...
...
@@ -301,7 +290,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
//
// })
image_scroll_top
.
setOnClickListener
(
this
)
// initStatus()
}
override
fun
setUserVisibleHint
(
isVisibleToUser
:
Boolean
)
{
...
...
@@ -843,7 +831,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
appbar_layout
.
setExpanded
(
false
)
appbar_layout
.
postDelayed
({
showAreaPopupWindow
()
},
300
)
;
},
300
)
}
R
.
id
.
tvSort
->
{
...
...
@@ -852,7 +840,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
appbar_layout
.
setExpanded
(
false
)
appbar_layout
.
postDelayed
({
showSortPopupWindow
()
},
300
)
;
},
300
)
}
R
.
id
.
tvFilter
->
{
...
...
@@ -861,7 +849,7 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
appbar_layout
.
setExpanded
(
false
)
appbar_layout
.
postDelayed
({
showFilterPopupWindow
()
},
300
)
;
},
300
)
}
R
.
id
.
tv_guide
->
{
...
...
@@ -896,7 +884,6 @@ class ExpertSearchFragment : BaseMvpFragment<IExpertSearchView, ExpertSearchPres
//显示筛选弹窗
private
fun
showFilterPopupWindow
()
{
// tempFilter.searchWord = etSearch.text.toString()
tempFilter
.
categories
.
clear
()
tempFilter
.
categories
.
addAll
(
allFilter
.
categories
)
tempFilter
.
reorder
=
allFilter
.
reorder
...
...
m-home/src/ydl/java/com/yidianling/home/adapter/YdlHomeAdapter.kt
View file @
a039c65c
...
...
@@ -119,10 +119,10 @@ class YdlHomeAdapter(private val mContext: Context,
}
override
fun
getItemViewType
(
position
:
Int
):
Int
{
if
(
position
<
list
.
size
)
{
return
list
[
position
].
type
!!
return
if
(
position
<
list
.
size
)
{
list
[
position
].
type
!!
}
else
{
return
-
1
-
1
}
}
...
...
m-home/src/ydl/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
View file @
a039c65c
...
...
@@ -295,7 +295,7 @@ open class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterIm
val
act
=
homeHeaderBean
.
activityResponse
if
(
act
!=
null
)
{
if
(!
TextUtils
.
isEmpty
(
act
!!
.
imageUrl
))
{
if
(!
TextUtils
.
isEmpty
(
act
.
imageUrl
))
{
img_ad
.
visibility
=
View
.
VISIBLE
GlideApp
.
with
(
this
).
load
(
act
!!
.
imageUrl
).
into
(
img_ad
)
img_ad
.
setOnClickListener
{
...
...
m-home/src/ydl/java/com/yidianling/home/ui/view/HomeButtonBannerView.kt
View file @
a039c65c
...
...
@@ -69,9 +69,9 @@ class HomeButtonBannerView(private val mContext: Context, private var homeEvent:
*/
private
fun
initButtonView
()
{
if
(
null
==
buttonParams
)
{
va
r
screenWidth
=
RxDeviceTool
.
getScreenWidth
(
mContext
)
va
r
viewWidth
=
((
screenWidth
-
2
*
9
*
RxDeviceTool
.
getScreenDensity
(
mContext
))
/
4
).
toInt
()
va
r
viewHeight
=
viewWidth
*
78
/
80
va
l
screenWidth
=
RxDeviceTool
.
getScreenWidth
(
mContext
)
va
l
viewWidth
=
((
screenWidth
-
2
*
9
*
RxDeviceTool
.
getScreenDensity
(
mContext
))
/
4
).
toInt
()
va
l
viewHeight
=
viewWidth
*
78
/
80
buttonParams
=
LinearLayout
.
LayoutParams
(
viewWidth
,
viewHeight
)
buttonParamsFrame
=
FrameLayout
.
LayoutParams
(
viewWidth
,
viewHeight
)
buttonParamsFrame2
=
FrameLayout
.
LayoutParams
((
viewWidth
/
2.0
).
toInt
(),
(
viewHeight
/
2.3
).
toInt
())
...
...
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