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
02dbf89f
Commit
02dbf89f
authored
Apr 10, 2020
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
华为渠道区分
parent
40bf9ef2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
16 deletions
+50
-16
config.gradle
config.gradle
+1
-1
YdlHomeAdapter.kt
m-home/src/xlzx/java/com/yidianling/home/adapter/YdlHomeAdapter.kt
+46
-15
HomeAssuageGriefView.kt
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomeAssuageGriefView.kt
+3
-0
No files found.
config.gradle
View file @
02dbf89f
...
@@ -46,7 +46,7 @@ ext {
...
@@ -46,7 +46,7 @@ ext {
"m-consultant"
:
"0.0.58.8"
,
"m-consultant"
:
"0.0.58.8"
,
"m-fm"
:
"0.0.29.3"
,
"m-fm"
:
"0.0.29.3"
,
"m-user"
:
"0.0.60.3"
,
"m-user"
:
"0.0.60.3"
,
"m-home"
:
"0.0.2
0.9
"
,
"m-home"
:
"0.0.2
1.1
"
,
"m-im"
:
"0.0.17.4"
,
"m-im"
:
"0.0.17.4"
,
"m-dynamic"
:
"0.0.7.5"
,
"m-dynamic"
:
"0.0.7.5"
,
...
...
m-home/src/xlzx/java/com/yidianling/home/adapter/YdlHomeAdapter.kt
View file @
02dbf89f
...
@@ -2,13 +2,14 @@ package com.yidianling.home.adapter
...
@@ -2,13 +2,14 @@ package com.yidianling.home.adapter
import
android.content.Context
import
android.content.Context
import
android.support.v7.widget.RecyclerView
import
android.support.v7.widget.RecyclerView
import
android.text.TextUtils
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
com.ydl.ydlcommon.data.PlatformDataManager.getRam
import
com.yidianling.home.R
import
com.yidianling.home.R
import
com.yidianling.home.constract.YdlHomeViewHolderConstract
import
com.yidianling.home.constract.YdlHomeViewHolderConstract
import
com.yidianling.home.event.HomeImpl
import
com.yidianling.home.event.HomeImpl
import
com.yidianling.home.event.IHomeEvent
import
com.yidianling.home.model.bean.HomeAskBean
import
com.yidianling.home.model.bean.HomeAskBean
import
com.yidianling.home.model.bean.HomeConfideBean
import
com.yidianling.home.model.bean.HomeConfideBean
import
com.yidianling.home.model.bean.HomeConsultBean
import
com.yidianling.home.model.bean.HomeConsultBean
...
@@ -22,9 +23,11 @@ import com.yidianling.home.ui.view.*
...
@@ -22,9 +23,11 @@ import com.yidianling.home.ui.view.*
* @Company 壹点灵
* @Company 壹点灵
* @date 2019/02/13
* @date 2019/02/13
*/
*/
class
YdlHomeAdapter
(
private
val
mContext
:
Context
,
class
YdlHomeAdapter
(
private
var
homeEvent
:
HomeImpl
,
private
val
mContext
:
Context
,
private
var
list
:
ArrayList
<
HomePagerDataBean
>)
:
RecyclerView
.
Adapter
<
RecyclerView
.
ViewHolder
>()
{
private
var
homeEvent
:
HomeImpl
,
private
var
list
:
ArrayList
<
HomePagerDataBean
>
)
:
RecyclerView
.
Adapter
<
RecyclerView
.
ViewHolder
>()
{
private
val
mInflater
:
LayoutInflater
=
LayoutInflater
.
from
(
mContext
)
private
val
mInflater
:
LayoutInflater
=
LayoutInflater
.
from
(
mContext
)
/**
/**
...
@@ -141,11 +144,17 @@ class YdlHomeAdapter(private val mContext: Context,
...
@@ -141,11 +144,17 @@ class YdlHomeAdapter(private val mContext: Context,
when
(
holder
)
{
when
(
holder
)
{
//顶部预约专家,即时倾诉,心理课堂,心理测试按钮模块
//顶部预约专家,即时倾诉,心理课堂,心理测试按钮模块
is
HomeButtonBannerViewHolder
->
{
is
HomeButtonBannerViewHolder
->
{
holder
.
buttonBannerView
.
initData
(
list
[
position
].
headerBean
?.
homeSaleData
,
list
[
position
].
headerBean
?.
askCategoryData
)
holder
.
buttonBannerView
.
initData
(
list
[
position
].
headerBean
?.
homeSaleData
,
list
[
position
].
headerBean
?.
askCategoryData
)
}
}
//倾诉*排解模块
//倾诉*排解模块
is
HomeConfideViewHolder
->
{
is
HomeConfideViewHolder
->
{
holder
.
confideViewView
.
setTitle
(
list
[
position
].
headerBean
?.
listenCategoryDate
,
confideSelectPosition
)
holder
.
confideViewView
.
setTitle
(
list
[
position
].
headerBean
?.
listenCategoryDate
,
confideSelectPosition
)
holder
.
confideViewView
.
setConfideExpertInfoView
(
list
[
position
].
confideBean
?.
body
)
holder
.
confideViewView
.
setConfideExpertInfoView
(
list
[
position
].
confideBean
?.
body
)
confidePosition
=
position
confidePosition
=
position
}
}
...
@@ -155,7 +164,15 @@ class YdlHomeAdapter(private val mContext: Context,
...
@@ -155,7 +164,15 @@ class YdlHomeAdapter(private val mContext: Context,
}
}
//解忧*问答模块
//解忧*问答模块
is
HomeAssuageGriefViewHolder
->
{
is
HomeAssuageGriefViewHolder
->
{
holder
.
assuageGriefViewView
.
initData
(
position
,
list
[
position
].
askBean
?.
data
)
val
ffrom
=
getRam
().
getChannelName
()
if
(!
TextUtils
.
isEmpty
(
ffrom
)
&&
ffrom
.
endsWith
(
"huawei"
))
{
val
parm
=
holder
.
itemView
.
layoutParams
parm
.
height
=
0
holder
.
itemView
.
layoutParams
=
parm
}
else
{
holder
.
assuageGriefViewView
.
initData
(
position
,
list
[
position
].
askBean
?.
data
)
}
}
}
//文章*阅读模块
//文章*阅读模块
is
HomeArticleViewHolder
->
{
is
HomeArticleViewHolder
->
{
...
@@ -163,8 +180,14 @@ class YdlHomeAdapter(private val mContext: Context,
...
@@ -163,8 +180,14 @@ class YdlHomeAdapter(private val mContext: Context,
}
}
//咨询模块
//咨询模块
is
HomeConsultViewHolder
->
{
is
HomeConsultViewHolder
->
{
holder
.
consultView
.
setTitle
(
list
[
position
].
headerBean
?.
consultCategoryData
,
consultSelectPosition
)
holder
.
consultView
.
setTitle
(
holder
.
consultView
.
setConsultInfoView
(
list
[
position
].
consultBean
?.
list
,
list
[
position
].
headerBean
?.
consultCategoryData
?.
get
(
consultSelectPosition
))
list
[
position
].
headerBean
?.
consultCategoryData
,
consultSelectPosition
)
holder
.
consultView
.
setConsultInfoView
(
list
[
position
].
consultBean
?.
list
,
list
[
position
].
headerBean
?.
consultCategoryData
?.
get
(
consultSelectPosition
)
)
consultPosition
=
position
consultPosition
=
position
}
}
//测试模块
//测试模块
...
@@ -177,25 +200,30 @@ class YdlHomeAdapter(private val mContext: Context,
...
@@ -177,25 +200,30 @@ class YdlHomeAdapter(private val mContext: Context,
override
fun
getItemCount
():
Int
{
override
fun
getItemCount
():
Int
{
return
list
.
size
return
list
.
size
}
}
/**
/**
* 顶部预约专家,即时倾诉,心理测试按钮模块 ViewHolder
* 顶部预约专家,即时倾诉,心理测试按钮模块 ViewHolder
*/
*/
inner
class
HomeButtonBannerViewHolder
(
val
buttonBannerView
:
HomeButtonBannerView
)
:
RecyclerView
.
ViewHolder
(
buttonBannerView
)
inner
class
HomeButtonBannerViewHolder
(
val
buttonBannerView
:
HomeButtonBannerView
)
:
RecyclerView
.
ViewHolder
(
buttonBannerView
)
/**
/**
* 咨询模块 ViewHolder
* 咨询模块 ViewHolder
*/
*/
inner
class
HomeConsultViewHolder
(
val
consultView
:
HomeConsultView
)
:
RecyclerView
.
ViewHolder
(
consultView
)
inner
class
HomeConsultViewHolder
(
val
consultView
:
HomeConsultView
)
:
RecyclerView
.
ViewHolder
(
consultView
)
/**
/**
* 倾诉*排解模块 ViewHolder
* 倾诉*排解模块 ViewHolder
*/
*/
inner
class
HomeConfideViewHolder
(
val
confideViewView
:
HomeConfideView
)
:
RecyclerView
.
ViewHolder
(
confideViewView
)
inner
class
HomeConfideViewHolder
(
val
confideViewView
:
HomeConfideView
)
:
RecyclerView
.
ViewHolder
(
confideViewView
)
/**
/**
* 课程*成长模块 ViewHolder
* 课程*成长模块 ViewHolder
*/
*/
inner
class
HomeCourseViewHolder
(
val
courseViewView
:
HomeCourseView
)
:
RecyclerView
.
ViewHolder
(
courseViewView
)
inner
class
HomeCourseViewHolder
(
val
courseViewView
:
HomeCourseView
)
:
RecyclerView
.
ViewHolder
(
courseViewView
)
/**
/**
* 测试模块 ViewHolder
* 测试模块 ViewHolder
...
@@ -205,11 +233,14 @@ class YdlHomeAdapter(private val mContext: Context,
...
@@ -205,11 +233,14 @@ class YdlHomeAdapter(private val mContext: Context,
/**
/**
* 解忧*问答模块 ViewHolder
* 解忧*问答模块 ViewHolder
*/
*/
inner
class
HomeAssuageGriefViewHolder
(
val
assuageGriefViewView
:
HomeAssuageGriefView
)
:
RecyclerView
.
ViewHolder
(
assuageGriefViewView
)
inner
class
HomeAssuageGriefViewHolder
(
val
assuageGriefViewView
:
HomeAssuageGriefView
)
:
RecyclerView
.
ViewHolder
(
assuageGriefViewView
)
/**
/**
* 文章*阅读模块 ViewHolder
* 文章*阅读模块 ViewHolder
*/
*/
inner
class
HomeArticleViewHolder
(
val
articleViewView
:
HomeArticleView
)
:
RecyclerView
.
ViewHolder
(
articleViewView
)
inner
class
HomeArticleViewHolder
(
val
articleViewView
:
HomeArticleView
)
:
RecyclerView
.
ViewHolder
(
articleViewView
)
/**
/**
* 底部提示语模块 ViewHolder
* 底部提示语模块 ViewHolder
...
...
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomeAssuageGriefView.kt
View file @
02dbf89f
package
com.yidianling.home.ui.view
package
com.yidianling.home.ui.view
import
android.content.Context
import
android.content.Context
import
android.graphics.Color
import
android.view.View
import
android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup
import
android.widget.LinearLayout
import
android.widget.LinearLayout
...
@@ -33,6 +34,7 @@ class HomeAssuageGriefView(private val mContext: Context, private var homeEvent:
...
@@ -33,6 +34,7 @@ class HomeAssuageGriefView(private val mContext: Context, private var homeEvent:
)
)
layoutParams
=
params
layoutParams
=
params
View
.
inflate
(
mContext
,
R
.
layout
.
home_assuage_grief_view
,
this
)
View
.
inflate
(
mContext
,
R
.
layout
.
home_assuage_grief_view
,
this
)
setBackgroundColor
(
Color
.
GREEN
)
homeModuleAssuageGriefViewHomeCommonTitleView
.
setTitle
(
"解忧·问答"
)
homeModuleAssuageGriefViewHomeCommonTitleView
.
setTitle
(
"解忧·问答"
)
homeModuleAssuageGriefViewHomeCommonTitleView
.
setOnClickListener
{
homeModuleAssuageGriefViewHomeCommonTitleView
.
setOnClickListener
{
homeEvent
?.
askMoreClick
()
homeEvent
?.
askMoreClick
()
...
@@ -42,6 +44,7 @@ class HomeAssuageGriefView(private val mContext: Context, private var homeEvent:
...
@@ -42,6 +44,7 @@ class HomeAssuageGriefView(private val mContext: Context, private var homeEvent:
fun
initData
(
position
:
Int
,
list
:
List
<
HomeAskBean
.
DataBean
>?)
{
fun
initData
(
position
:
Int
,
list
:
List
<
HomeAskBean
.
DataBean
>?)
{
//添加View
//添加View
if
(
list
==
null
)
{
if
(
list
==
null
)
{
visibility
=
View
.
GONE
return
return
}
}
if
(
cacheList
.
size
!=
list
?.
size
)
{
if
(
cacheList
.
size
!=
list
?.
size
)
{
...
...
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