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
3038c91f
Commit
3038c91f
authored
Jun 01, 2022
by
万齐军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: data class 修改
parent
ffc414d4
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
192 additions
and
147 deletions
+192
-147
ConfideHomeActivity.kt
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
+8
-4
ConfideHomeBodyBean.kt
m-confide/src/main/java/com/ydl/confide/home/bean/ConfideHomeBodyBean.kt
+145
-112
ConfideHomeBodyGroupItemBean.kt
m-confide/src/main/java/com/ydl/confide/home/bean/ConfideHomeBodyGroupItemBean.kt
+5
-3
ConfideHomeFiterItemBean.kt
m-confide/src/main/java/com/ydl/confide/home/bean/ConfideHomeFiterItemBean.kt
+12
-10
ConfideHomeEventImpl.kt
m-confide/src/main/java/com/ydl/confide/home/event/ConfideHomeEventImpl.kt
+9
-9
ConfideHomeSexAgePopupWindow.kt
m-confide/src/main/java/com/ydl/confide/home/popwindow/ConfideHomeSexAgePopupWindow.kt
+9
-5
ConfideHomeRecommendExpertItemView.kt
m-confide/src/main/java/com/ydl/confide/home/widget/ConfideHomeRecommendExpertItemView.kt
+2
-2
ConfideHomeRecommendView.kt
m-confide/src/main/java/com/ydl/confide/home/widget/ConfideHomeRecommendView.kt
+2
-2
No files found.
m-confide/src/main/java/com/ydl/confide/home/ConfideHomeActivity.kt
View file @
3038c91f
package
com.ydl.confide.home
package
com.ydl.confide.home
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.app.Activity
import
android.content.Context
import
android.content.Context
import
android.graphics.Color
import
android.graphics.Color
import
android.net.Uri
import
android.net.Uri
...
@@ -34,7 +33,6 @@ import com.ydl.confide.home.modular.service.ConfideWebServiceImpl
...
@@ -34,7 +33,6 @@ import com.ydl.confide.home.modular.service.ConfideWebServiceImpl
import
com.ydl.confide.home.presenter.ConfideHomePresenterImpl
import
com.ydl.confide.home.presenter.ConfideHomePresenterImpl
import
com.ydl.confide.home.util.ConfideHomeUtils
import
com.ydl.confide.home.util.ConfideHomeUtils
import
com.ydl.confide.home.widget.FilterItemDecoration
import
com.ydl.confide.home.widget.FilterItemDecoration
import
com.ydl.confide.intro.VideoViewModel
import
com.ydl.confide.router.PhoneCallIn
import
com.ydl.confide.router.PhoneCallIn
import
com.ydl.webview.H5Params
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.webview.NewH5Activity
...
@@ -131,8 +129,14 @@ class ConfideHomeActivity :
...
@@ -131,8 +129,14 @@ class ConfideHomeActivity :
private
fun
initParam
()
{
private
fun
initParam
()
{
allFiltersBean
=
ConfideHomeAllFiltersBean
(
allFiltersBean
=
ConfideHomeAllFiltersBean
(
page
,
page
,
ConfideHomeFiterItemBean
(
"1"
,
""
),
ConfideHomeFiterItemBean
().
apply
{
ConfideHomeFiterItemBean
(
"-1"
,
""
),
id
=
"-1"
name
=
""
},
ConfideHomeFiterItemBean
().
apply
{
id
=
"-1"
name
=
""
},
ArrayList
(),
ArrayList
(),
ArrayList
()
ArrayList
()
)
)
...
...
m-confide/src/main/java/com/ydl/confide/home/bean/ConfideHomeBodyBean.kt
View file @
3038c91f
...
@@ -7,120 +7,153 @@ package com.ydl.confide.home.bean
...
@@ -7,120 +7,153 @@ package com.ydl.confide.home.bean
* @Company 壹点灵
* @Company 壹点灵
* @date 2018/8/10
* @date 2018/8/10
*/
*/
data class
ConfideHomeBodyBean
(
/**
class
ConfideHomeBodyBean
{
* 公共参数
/**
*/
* 公共参数
val
linkUrl
:
String
?,
*/
//倾诉Id
var
linkUrl
:
String
?
=
null
val
confidedId
:
String
?,
//专家Id(专家编号)
//倾诉Id
val
doctorId
:
String
?,
var
confidedId
:
String
?
=
null
//专家的uid
val
uid
:
Int
?,
//专家Id(专家编号)
//咨询师姓名
var
doctorId
:
String
?
=
null
val
confidedName
:
String
?,
val
videoTitle
:
String
?,
//专家的uid
//咨询师性别 1.男 2.女
var
uid
:
Int
?
=
null
val
confideSex
:
Int
=
1
,
//对你留言
//咨询师姓名
val
confideContent
:
String
?,
var
confidedName
:
String
?
=
null
//咨询师头像地址
var
videoTitle
:
String
?
=
null
val
confidedIcon
:
String
?,
//是否在线 //1在线 2离线 3通话中 4继续倾诉
//咨询师性别 1.男 2.女
val
confideLine
:
Int
?,
var
confideSex
:
Int
=
1
//已聆听文案
val
confideHearNum
:
String
?,
//对你留言
//历史倾听记录
var
confideContent
:
String
?
=
null
val
confideHistory
:
String
?,
//是否为播放状态
//咨询师头像地址
var
confideIsPlay
:
Boolean
=
false
,
var
confidedIcon
:
String
?
=
null
//音频播放地址
val
confideVoice
:
String
?,
//是否在线 //1在线 2离线 3通话中 4继续倾诉
//副标题(底部更多文案)
var
confideLine
:
Int
?
=
null
val
subTitle
:
String
?,
//咨询师标题
//已聆听文案
val
confidedTitle
:
String
?,
var
confideHearNum
:
String
?
=
null
val
title
:
String
?,
//副标题点击事件
//历史倾听记录
val
subLinkUrl
:
String
?,
var
confideHistory
:
String
?
=
null
//咨询师背景图片
val
confideBgUrl
:
String
?,
//是否为播放状态
//价格
var
confideIsPlay
:
Boolean
=
false
val
confideFee
:
String
?,
//红包金额
//音频播放地址
val
couponMoney
:
String
?,
var
confideVoice
:
String
?
=
null
//新用户优惠文案
val
couponText
:
String
?,
//副标题(底部更多文案)
val
videoUrl
:
String
?,
var
subTitle
:
String
?
=
null
val
coverVideoPicture
:
String
?,
val
coverPicture
:
String
?,
//咨询师标题
/**
var
confidedTitle
:
String
?
=
null
* banner数据
var
title
:
String
?
=
null
*/
//banner id
//副标题点击事件
val
bannerId
:
String
?,
var
subLinkUrl
:
String
?
=
null
//banner 图片地址
val
bannerImageUrl
:
String
?,
//咨询师背景图片
//banner标题(用于数据埋点)
var
confideBgUrl
:
String
?
=
null
val
bannerTitle
:
String
?,
//跳转地址
//价格
val
bannerLinkUrl
:
String
?,
var
confideFee
:
String
?
=
null
/**
* 最近倾诉数据说明(查看公共参数说明)
//红包金额
*/
var
couponMoney
:
String
?
=
null
//...
/**
//新用户优惠文案
* 分类参数
var
couponText
:
String
?
=
null
*/
var
videoUrl
:
String
?
=
null
//分类Id
var
coverVideoPicture
:
String
?
=
null
val
categoryId
:
String
?,
var
coverPicture
:
String
?
=
null
//分类名称
val
categoryName
:
String
?,
/**
//分类类型(1.倾诉指南,2.专业师资)
* banner数据
val
categoryType
:
Int
?,
*/
//分类图片地址
//banner id
val
categoryIcon
:
String
?,
var
bannerId
:
String
?
=
null
//分类内容
val
categoryContent
:
String
?,
//banner 图片地址
/**
var
bannerImageUrl
:
String
?
=
null
* 为你推荐筛选模块数据
*/
//banner标题(用于数据埋点)
//筛选标题
var
bannerTitle
:
String
?
=
null
val
filterName
:
String
?,
//筛选类型(1.综合排序 2.性别年龄 3.擅长方向)
//跳转地址
val
filterType
:
Int
?,
var
bannerLinkUrl
:
String
?
=
null
//筛选数据集
/**
val
group
:
ArrayList
<
ConfideHomeBodyGroupItemBean
>?,
* 最近倾诉数据说明(查看公共参数说明)
*/
//...
/**
* 分类参数
*/
//分类Id
var
categoryId
:
String
?
=
null
//分类名称
var
categoryName
:
String
?
=
null
//分类类型(1.倾诉指南,2.专业师资)
var
categoryType
:
Int
?
=
null
//分类图片地址
var
categoryIcon
:
String
?
=
null
//分类内容
var
categoryContent
:
String
?
=
null
/**
* 为你推荐筛选模块数据
*/
//筛选标题
var
filterName
:
String
?
=
null
//筛选类型(1.综合排序 2.性别年龄 3.擅长方向)
var
filterType
:
Int
?
=
null
//筛选数据集
var
group
:
List
<
ConfideHomeBodyGroupItemBean
>?
=
emptyList
()
// //性别筛选标题
// //性别筛选标题
// va
l
sexTitle : String?,
// va
r
sexTitle : String?,
// //性别筛选数据集
// //性别筛选数据集
// va
l
sexData : ArrayList<ConfideHomeFiterItemBean>?,
// va
r
sexData : ArrayList<ConfideHomeFiterItemBean>?,
// //年龄筛选标题
// //年龄筛选标题
// va
l
ageTitle : String?,
// va
r
ageTitle : String?,
// //年龄筛选数据集
// //年龄筛选数据集
// va
l
ageData : ArrayList<ConfideHomeFiterItemBean>?,
// va
r
ageData : ArrayList<ConfideHomeFiterItemBean>?,
// //擅长方向标题
// //擅长方向标题
// va
l
goodTitle : String?,
// va
r
goodTitle : String?,
// //擅长方向筛选数据集
// //擅长方向筛选数据集
// val goodData : ArrayList<ConfideHomeFiterItemBean>?,
// var goodData : ArrayList<ConfideHomeFiterItemBean>?,
/**
/**
* 为你推荐数据说明
* 为你推荐数据说明
*/
*/
val
confidedTag
:
List
<
String
>?,
var
confidedTag
:
List
<
String
>?
=
null
/**
/**
* 听声寻人数据说明(请查看公共参数说明)
* 听声寻人数据说明(请查看公共参数说明)
*/
*/
//...
//...
/**
/**
* 最佳倾诉榜单数据说明
* 最佳倾诉榜单数据说明
*/
*/
//倾诉统计文案(8513人)
//倾诉统计文案(8513人)
val
confideNum
:
String
?,
var
confideNum
:
String
?
=
null
//接通率
val
confideConnection
:
String
?,
//接通率
//
var
confideConnection
:
String
?
=
null
var
bodyData
:
List
<
ConfideHomeBodyBean
>?,
var
confidePraiseScore
:
String
?,
//新增评分字段
//
var
listenFree
:
Boolean
?
//新增倾诉免费标识字段
var
bodyData
:
List
<
ConfideHomeBodyBean
>?
=
null
)
var
confidePraiseScore
:
String
?
=
null
//新增评分字段
\ No newline at end of file
var
listenFree
:
Boolean
?
=
null
//新增倾诉免费标识字段
}
\ No newline at end of file
m-confide/src/main/java/com/ydl/confide/home/bean/ConfideHomeBodyGroupItemBean.kt
View file @
3038c91f
...
@@ -7,5 +7,7 @@ package com.ydl.confide.home.bean
...
@@ -7,5 +7,7 @@ package com.ydl.confide.home.bean
* @Company 壹点灵
* @Company 壹点灵
* @date 2018/10/15
* @date 2018/10/15
*/
*/
data class
ConfideHomeBodyGroupItemBean
(
val
title
:
String
?,
class
ConfideHomeBodyGroupItemBean
{
val
data
:
ArrayList
<
ConfideHomeFiterItemBean
>?)
var
title
:
String
?
=
null
\ No newline at end of file
var
data
:
ArrayList
<
ConfideHomeFiterItemBean
>?
=
null
}
\ No newline at end of file
m-confide/src/main/java/com/ydl/confide/home/bean/ConfideHomeFiterItemBean.kt
View file @
3038c91f
...
@@ -7,12 +7,14 @@ package com.ydl.confide.home.bean
...
@@ -7,12 +7,14 @@ package com.ydl.confide.home.bean
* @Company 壹点灵
* @Company 壹点灵
* @date 2018/9/22
* @date 2018/9/22
*/
*/
data class
ConfideHomeFiterItemBean
(
class
ConfideHomeFiterItemBean
{
/**
/**
* 筛选id
* 筛选id
*/
*/
var
id
:
String
?,
var
id
:
String
?
=
null
/**
* 筛选名称
/**
*/
* 筛选名称
var
name
:
String
?)
*/
\ No newline at end of file
var
name
:
String
?
=
null
}
\ No newline at end of file
m-confide/src/main/java/com/ydl/confide/home/event/ConfideHomeEventImpl.kt
View file @
3038c91f
...
@@ -349,9 +349,9 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
...
@@ -349,9 +349,9 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
return
return
}
}
var
sortPopup
:
ConfideHomeSortPopupWindow
?
=
null
var
sortPopup
:
ConfideHomeSortPopupWindow
?
=
null
if
(
bodyBean
.
group
!=
null
&&
!
bodyBean
.
group
.
isEmpty
()
&&
null
!=
bodyBean
.
group
[
0
].
data
&&
!
bodyBean
.
group
[
0
].
data
!!
.
isEmpty
())
{
if
(
bodyBean
.
group
!=
null
&&
!
bodyBean
.
group
!!
.
isEmpty
()
&&
null
!=
bodyBean
.
group
!!
[
0
].
data
&&
!
bodyBean
.
group
!!
[
0
].
data
!!
.
isEmpty
())
{
ConfideHomeUtils
.
synchroTextDrawable
(
mContext
!!
,
1
,
IConfideHomeConfig
.
FILTER_STATUS_OPEN
,
filterView
,
mConfideAdapter
)
ConfideHomeUtils
.
synchroTextDrawable
(
mContext
!!
,
1
,
IConfideHomeConfig
.
FILTER_STATUS_OPEN
,
filterView
,
mConfideAdapter
)
sortPopup
=
ConfideHomeSortPopupWindow
(
mContext
!!
,
bodyBean
.
group
[
0
].
data
!!
,
allFiltersBean
!!
.
selectSort
!!
,
object
:
ConfideHomeSortPopupWindow
.
OnSortItemSelectedListener
{
sortPopup
=
ConfideHomeSortPopupWindow
(
mContext
!!
,
bodyBean
.
group
!!
[
0
].
data
!!
,
allFiltersBean
!!
.
selectSort
!!
,
object
:
ConfideHomeSortPopupWindow
.
OnSortItemSelectedListener
{
override
fun
onSortItemSelected
(
sortItem
:
ConfideHomeFiterItemBean
)
{
override
fun
onSortItemSelected
(
sortItem
:
ConfideHomeFiterItemBean
)
{
//更改小图标
//更改小图标
...
@@ -384,17 +384,17 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
...
@@ -384,17 +384,17 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
* @param mConfideAdapter section适配器
* @param mConfideAdapter section适配器
*/
*/
override
fun
showSexAgePopupWindow
(
v_line_top
:
View
,
filterView
:
ConfideHomeFilterView
,
bodyBean
:
ConfideHomeBodyBean
?,
allFiltersBean
:
ConfideHomeAllFiltersBean
,
mConfideAdapter
:
ConfideHomeAdapter
)
{
override
fun
showSexAgePopupWindow
(
v_line_top
:
View
,
filterView
:
ConfideHomeFilterView
,
bodyBean
:
ConfideHomeBodyBean
?,
allFiltersBean
:
ConfideHomeAllFiltersBean
,
mConfideAdapter
:
ConfideHomeAdapter
)
{
if
(
null
==
bodyBean
||
((
null
==
bodyBean
.
group
||
bodyBean
.
group
.
isEmpty
())
&&
(
null
==
bodyBean
.
group
!!
[
0
].
data
||
bodyBean
.
group
[
0
].
data
!!
.
isEmpty
())))
{
if
(
null
==
bodyBean
||
((
null
==
bodyBean
.
group
||
bodyBean
.
group
!!
.
isEmpty
())
&&
(
null
==
bodyBean
.
group
!!
[
0
].
data
||
bodyBean
.
group
!!
[
0
].
data
!!
.
isEmpty
())))
{
ToastUtil
.
toastShort
(
"数据初始化失败,请重新下拉刷新"
)
ToastUtil
.
toastShort
(
"数据初始化失败,请重新下拉刷新"
)
return
return
}
}
val
sexData
=
ArrayList
<
ConfideHomeFiterItemBean
>()
val
sexData
=
ArrayList
<
ConfideHomeFiterItemBean
>()
if
(
null
!=
bodyBean
.
group
[
0
].
data
)
{
if
(
null
!=
bodyBean
.
group
!!
[
0
].
data
)
{
sexData
.
addAll
(
bodyBean
.
group
[
0
].
data
!!
)
sexData
.
addAll
(
bodyBean
.
group
!!
[
0
].
data
!!
)
}
}
val
ageData
=
ArrayList
<
ConfideHomeFiterItemBean
>()
val
ageData
=
ArrayList
<
ConfideHomeFiterItemBean
>()
if
(
1
<
bodyBean
.
group
.
size
&&
null
!=
bodyBean
.
group
[
1
].
data
)
{
if
(
1
<
bodyBean
.
group
!!
.
size
&&
null
!=
bodyBean
.
group
!!
[
1
].
data
)
{
ageData
.
addAll
(
bodyBean
.
group
[
1
].
data
!!
)
ageData
.
addAll
(
bodyBean
.
group
!!
[
1
].
data
!!
)
}
}
val
categoryPopup
=
ConfideHomeSexAgePopupWindow
(
mContext
!!
,
sexData
,
ageData
,
allFiltersBean
)
val
categoryPopup
=
ConfideHomeSexAgePopupWindow
(
mContext
!!
,
sexData
,
ageData
,
allFiltersBean
)
ConfideHomeUtils
.
synchroStyle
(
mContext
!!
,
2
,
IConfideHomeConfig
.
FILTER_STATUS_OPEN
,
filterView
,
mConfideAdapter
)
ConfideHomeUtils
.
synchroStyle
(
mContext
!!
,
2
,
IConfideHomeConfig
.
FILTER_STATUS_OPEN
,
filterView
,
mConfideAdapter
)
...
@@ -435,8 +435,8 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
...
@@ -435,8 +435,8 @@ class ConfideHomeEventImpl(context: Context, var confideHomeView: IConfideHomeCo
* @param mConfideAdapter section适配器
* @param mConfideAdapter section适配器
*/
*/
override
fun
showGoodPopupWindow
(
v_line_top
:
View
,
filterView
:
ConfideHomeFilterView
,
bodyBean
:
ConfideHomeBodyBean
?,
allFiltersBean
:
ConfideHomeAllFiltersBean
,
mConfideAdapter
:
ConfideHomeAdapter
)
{
override
fun
showGoodPopupWindow
(
v_line_top
:
View
,
filterView
:
ConfideHomeFilterView
,
bodyBean
:
ConfideHomeBodyBean
?,
allFiltersBean
:
ConfideHomeAllFiltersBean
,
mConfideAdapter
:
ConfideHomeAdapter
)
{
if
(
bodyBean
!=
null
&&
null
!=
bodyBean
.
group
&&
!
bodyBean
.
group
.
isEmpty
()
&&
null
!=
bodyBean
.
group
[
0
].
data
&&
!
bodyBean
.
group
[
0
].
data
!!
.
isEmpty
())
{
if
(
bodyBean
!=
null
&&
null
!=
bodyBean
.
group
&&
!
bodyBean
.
group
!!
.
isEmpty
()
&&
null
!=
bodyBean
.
group
!!
[
0
].
data
&&
!
bodyBean
.
group
!!
[
0
].
data
!!
.
isEmpty
())
{
val
categoryPopup
=
ConfideHomeGoodPopupWindow
(
mContext
!!
,
bodyBean
.
group
[
0
].
data
!!
,
allFiltersBean
.
selectGoodData
!!
)
val
categoryPopup
=
ConfideHomeGoodPopupWindow
(
mContext
!!
,
bodyBean
.
group
!!
[
0
].
data
!!
,
allFiltersBean
.
selectGoodData
!!
)
ConfideHomeUtils
.
synchroStyle
(
mContext
!!
,
3
,
IConfideHomeConfig
.
FILTER_STATUS_OPEN
,
filterView
,
mConfideAdapter
)
ConfideHomeUtils
.
synchroStyle
(
mContext
!!
,
3
,
IConfideHomeConfig
.
FILTER_STATUS_OPEN
,
filterView
,
mConfideAdapter
)
categoryPopup
!!
.
setOnDismissListener
{
categoryPopup
!!
.
setOnDismissListener
{
if
(
allFiltersBean
.
selectGoodData
!!
.
size
>
1
||
(
allFiltersBean
.
selectGoodData
!!
.
size
==
1
&&
allFiltersBean
!!
.
selectGoodData
!!
[
0
]
!=
bodyBean
.
group
!!
[
0
].
data
!!
[
0
]))
{
if
(
allFiltersBean
.
selectGoodData
!!
.
size
>
1
||
(
allFiltersBean
.
selectGoodData
!!
.
size
==
1
&&
allFiltersBean
!!
.
selectGoodData
!!
[
0
]
!=
bodyBean
.
group
!!
[
0
].
data
!!
[
0
]))
{
...
...
m-confide/src/main/java/com/ydl/confide/home/popwindow/ConfideHomeSexAgePopupWindow.kt
View file @
3038c91f
...
@@ -2,14 +2,14 @@ package com.ydl.confide.home.popwindow
...
@@ -2,14 +2,14 @@ package com.ydl.confide.home.popwindow
import
android.content.Context
import
android.content.Context
import
android.graphics.drawable.BitmapDrawable
import
android.graphics.drawable.BitmapDrawable
import
androidx.recyclerview.widget.GridLayoutManager
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
android.view.LayoutInflater
import
android.view.LayoutInflater
import
android.view.View
import
android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup
import
android.widget.PopupWindow
import
android.widget.PopupWindow
import
android.widget.TextView
import
android.widget.TextView
import
androidx.recyclerview.widget.GridLayoutManager
import
androidx.recyclerview.widget.LinearLayoutManager
import
androidx.recyclerview.widget.RecyclerView
import
com.ydl.confide.R
import
com.ydl.confide.R
import
com.ydl.confide.home.bean.ConfideHomeAllFiltersBean
import
com.ydl.confide.home.bean.ConfideHomeAllFiltersBean
import
com.ydl.confide.home.bean.ConfideHomeFiterItemBean
import
com.ydl.confide.home.bean.ConfideHomeFiterItemBean
...
@@ -65,7 +65,10 @@ class ConfideHomeSexAgePopupWindow(context: Context, sexData: ArrayList<ConfideH
...
@@ -65,7 +65,10 @@ class ConfideHomeSexAgePopupWindow(context: Context, sexData: ArrayList<ConfideH
dismiss
()
dismiss
()
}
}
view
.
btnReset
.
setOnClickListener
{
view
.
btnReset
.
setOnClickListener
{
selectSex
=
ConfideHomeFiterItemBean
(
"-1"
,
""
)
selectSex
=
ConfideHomeFiterItemBean
().
apply
{
id
=
"-1"
name
=
""
}
mAllFiltersBean
!!
.
selectSex
=
selectSex
mAllFiltersBean
!!
.
selectSex
=
selectSex
initSexData
(
view
,
mAllFiltersBean
!!
)
initSexData
(
view
,
mAllFiltersBean
!!
)
sexAgeAdapter
?.
cleanSelectedGoods
()
sexAgeAdapter
?.
cleanSelectedGoods
()
...
@@ -81,7 +84,8 @@ class ConfideHomeSexAgePopupWindow(context: Context, sexData: ArrayList<ConfideH
...
@@ -81,7 +84,8 @@ class ConfideHomeSexAgePopupWindow(context: Context, sexData: ArrayList<ConfideH
private
fun
initData
(
sexData
:
ArrayList
<
ConfideHomeFiterItemBean
>,
ageData
:
ArrayList
<
ConfideHomeFiterItemBean
>,
allFiltersBean
:
ConfideHomeAllFiltersBean
){
private
fun
initData
(
sexData
:
ArrayList
<
ConfideHomeFiterItemBean
>,
ageData
:
ArrayList
<
ConfideHomeFiterItemBean
>,
allFiltersBean
:
ConfideHomeAllFiltersBean
){
//初始化已选择性别数据
//初始化已选择性别数据
if
(
null
==
selectSex
){
if
(
null
==
selectSex
){
selectSex
=
ConfideHomeFiterItemBean
(
"-1"
,
""
)
selectSex
=
ConfideHomeFiterItemBean
().
apply
{
id
=
"-1"
name
=
""
}
}
}
if
(
null
!=
allFiltersBean
.
selectSex
){
if
(
null
!=
allFiltersBean
.
selectSex
){
selectSex
!!
.
id
=
allFiltersBean
.
selectSex
!!
.
id
selectSex
!!
.
id
=
allFiltersBean
.
selectSex
!!
.
id
...
...
m-confide/src/main/java/com/ydl/confide/home/widget/ConfideHomeRecommendExpertItemView.kt
View file @
3038c91f
...
@@ -202,11 +202,11 @@ class ConfideHomeRecommendExpertItemView(mContext: Context, private var confideH
...
@@ -202,11 +202,11 @@ class ConfideHomeRecommendExpertItemView(mContext: Context, private var confideH
*/
*/
private
fun
setConfideTag
(
bodyBean
:
ConfideHomeBodyBean
)
{
private
fun
setConfideTag
(
bodyBean
:
ConfideHomeBodyBean
)
{
flowlayout_tag
.
removeAllViews
()
flowlayout_tag
.
removeAllViews
()
if
(
null
==
bodyBean
.
confidedTag
||
bodyBean
.
confidedTag
.
isEmpty
())
{
if
(
null
==
bodyBean
.
confidedTag
||
bodyBean
.
confidedTag
!!
.
isEmpty
())
{
return
return
}
}
var
i
=
0
var
i
=
0
for
(
tag
in
bodyBean
.
confidedTag
)
{
for
(
tag
in
bodyBean
.
confidedTag
!!
)
{
if
(
i
>
4
)
break
if
(
i
>
4
)
break
var
params
=
LinearLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
dp16
)
var
params
=
LinearLayout
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
,
dp16
)
params
.
setMargins
(
0
,
0
,
dp4
,
0
)
params
.
setMargins
(
0
,
0
,
dp4
,
0
)
...
...
m-confide/src/main/java/com/ydl/confide/home/widget/ConfideHomeRecommendView.kt
View file @
3038c91f
...
@@ -242,12 +242,12 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con
...
@@ -242,12 +242,12 @@ class ConfideHomeRecommendView(var view: IConfideHomeContract.View, context: Con
// }
// }
private
fun
setConfideTag
(
bodyBean
:
ConfideHomeBodyBean
)
{
private
fun
setConfideTag
(
bodyBean
:
ConfideHomeBodyBean
)
{
if
(
null
==
bodyBean
.
confidedTag
||
bodyBean
.
confidedTag
.
isEmpty
())
{
if
(
null
==
bodyBean
.
confidedTag
||
bodyBean
.
confidedTag
!!
.
isEmpty
())
{
return
return
}
}
var
i
=
0
var
i
=
0
val
sb
=
StringBuilder
()
val
sb
=
StringBuilder
()
for
(
tag
in
bodyBean
.
confidedTag
)
{
for
(
tag
in
bodyBean
.
confidedTag
!!
)
{
if
(
i
>
4
)
break
if
(
i
>
4
)
break
sb
.
append
(
tag
).
append
(
" | "
)
sb
.
append
(
tag
).
append
(
" | "
)
i
++
i
++
...
...
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