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 {
"m-consultant"
:
"0.0.58.8"
,
"m-fm"
:
"0.0.29.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-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
import
android.content.Context
import
android.support.v7.widget.RecyclerView
import
android.text.TextUtils
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
com.ydl.ydlcommon.data.PlatformDataManager.getRam
import
com.yidianling.home.R
import
com.yidianling.home.constract.YdlHomeViewHolderConstract
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.HomeConfideBean
import
com.yidianling.home.model.bean.HomeConsultBean
...
...
@@ -22,9 +23,11 @@ import com.yidianling.home.ui.view.*
* @Company 壹点灵
* @date 2019/02/13
*/
class
YdlHomeAdapter
(
private
val
mContext
:
Context
,
private
var
homeEvent
:
HomeImpl
,
private
var
list
:
ArrayList
<
HomePagerDataBean
>)
:
RecyclerView
.
Adapter
<
RecyclerView
.
ViewHolder
>()
{
class
YdlHomeAdapter
(
private
val
mContext
:
Context
,
private
var
homeEvent
:
HomeImpl
,
private
var
list
:
ArrayList
<
HomePagerDataBean
>
)
:
RecyclerView
.
Adapter
<
RecyclerView
.
ViewHolder
>()
{
private
val
mInflater
:
LayoutInflater
=
LayoutInflater
.
from
(
mContext
)
/**
...
...
@@ -141,11 +144,17 @@ class YdlHomeAdapter(private val mContext: Context,
when
(
holder
)
{
//顶部预约专家,即时倾诉,心理课堂,心理测试按钮模块
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
->
{
holder
.
confideViewView
.
setTitle
(
list
[
position
].
headerBean
?.
listenCategoryDate
,
confideSelectPosition
)
holder
.
confideViewView
.
setTitle
(
list
[
position
].
headerBean
?.
listenCategoryDate
,
confideSelectPosition
)
holder
.
confideViewView
.
setConfideExpertInfoView
(
list
[
position
].
confideBean
?.
body
)
confidePosition
=
position
}
...
...
@@ -155,7 +164,15 @@ class YdlHomeAdapter(private val mContext: Context,
}
//解忧*问答模块
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
->
{
...
...
@@ -163,8 +180,14 @@ class YdlHomeAdapter(private val mContext: Context,
}
//咨询模块
is
HomeConsultViewHolder
->
{
holder
.
consultView
.
setTitle
(
list
[
position
].
headerBean
?.
consultCategoryData
,
consultSelectPosition
)
holder
.
consultView
.
setConsultInfoView
(
list
[
position
].
consultBean
?.
list
,
list
[
position
].
headerBean
?.
consultCategoryData
?.
get
(
consultSelectPosition
))
holder
.
consultView
.
setTitle
(
list
[
position
].
headerBean
?.
consultCategoryData
,
consultSelectPosition
)
holder
.
consultView
.
setConsultInfoView
(
list
[
position
].
consultBean
?.
list
,
list
[
position
].
headerBean
?.
consultCategoryData
?.
get
(
consultSelectPosition
)
)
consultPosition
=
position
}
//测试模块
...
...
@@ -177,25 +200,30 @@ class YdlHomeAdapter(private val mContext: Context,
override
fun
getItemCount
():
Int
{
return
list
.
size
}
/**
* 顶部预约专家,即时倾诉,心理测试按钮模块 ViewHolder
*/
inner
class
HomeButtonBannerViewHolder
(
val
buttonBannerView
:
HomeButtonBannerView
)
:
RecyclerView
.
ViewHolder
(
buttonBannerView
)
inner
class
HomeButtonBannerViewHolder
(
val
buttonBannerView
:
HomeButtonBannerView
)
:
RecyclerView
.
ViewHolder
(
buttonBannerView
)
/**
* 咨询模块 ViewHolder
*/
inner
class
HomeConsultViewHolder
(
val
consultView
:
HomeConsultView
)
:
RecyclerView
.
ViewHolder
(
consultView
)
inner
class
HomeConsultViewHolder
(
val
consultView
:
HomeConsultView
)
:
RecyclerView
.
ViewHolder
(
consultView
)
/**
* 倾诉*排解模块 ViewHolder
*/
inner
class
HomeConfideViewHolder
(
val
confideViewView
:
HomeConfideView
)
:
RecyclerView
.
ViewHolder
(
confideViewView
)
inner
class
HomeConfideViewHolder
(
val
confideViewView
:
HomeConfideView
)
:
RecyclerView
.
ViewHolder
(
confideViewView
)
/**
* 课程*成长模块 ViewHolder
*/
inner
class
HomeCourseViewHolder
(
val
courseViewView
:
HomeCourseView
)
:
RecyclerView
.
ViewHolder
(
courseViewView
)
inner
class
HomeCourseViewHolder
(
val
courseViewView
:
HomeCourseView
)
:
RecyclerView
.
ViewHolder
(
courseViewView
)
/**
* 测试模块 ViewHolder
...
...
@@ -205,11 +233,14 @@ class YdlHomeAdapter(private val mContext: Context,
/**
* 解忧*问答模块 ViewHolder
*/
inner
class
HomeAssuageGriefViewHolder
(
val
assuageGriefViewView
:
HomeAssuageGriefView
)
:
RecyclerView
.
ViewHolder
(
assuageGriefViewView
)
inner
class
HomeAssuageGriefViewHolder
(
val
assuageGriefViewView
:
HomeAssuageGriefView
)
:
RecyclerView
.
ViewHolder
(
assuageGriefViewView
)
/**
* 文章*阅读模块 ViewHolder
*/
inner
class
HomeArticleViewHolder
(
val
articleViewView
:
HomeArticleView
)
:
RecyclerView
.
ViewHolder
(
articleViewView
)
inner
class
HomeArticleViewHolder
(
val
articleViewView
:
HomeArticleView
)
:
RecyclerView
.
ViewHolder
(
articleViewView
)
/**
* 底部提示语模块 ViewHolder
...
...
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomeAssuageGriefView.kt
View file @
02dbf89f
package
com.yidianling.home.ui.view
import
android.content.Context
import
android.graphics.Color
import
android.view.View
import
android.view.ViewGroup
import
android.widget.LinearLayout
...
...
@@ -33,6 +34,7 @@ class HomeAssuageGriefView(private val mContext: Context, private var homeEvent:
)
layoutParams
=
params
View
.
inflate
(
mContext
,
R
.
layout
.
home_assuage_grief_view
,
this
)
setBackgroundColor
(
Color
.
GREEN
)
homeModuleAssuageGriefViewHomeCommonTitleView
.
setTitle
(
"解忧·问答"
)
homeModuleAssuageGriefViewHomeCommonTitleView
.
setOnClickListener
{
homeEvent
?.
askMoreClick
()
...
...
@@ -42,6 +44,7 @@ class HomeAssuageGriefView(private val mContext: Context, private var homeEvent:
fun
initData
(
position
:
Int
,
list
:
List
<
HomeAskBean
.
DataBean
>?)
{
//添加View
if
(
list
==
null
)
{
visibility
=
View
.
GONE
return
}
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