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
4c425445
Commit
4c425445
authored
Oct 13, 2021
by
YKai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 主马甲包同步专家档案功能
parent
759bef26
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
23 deletions
+16
-23
DemoGlobalConfig.java
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
+2
-2
home_data_xlzx.json
m-home/src/main/assets/home_data_xlzx.json
+0
-0
YdlHomeFragment.kt
m-home/src/xlzx/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
+3
-3
HomeConsultView.kt
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomeConsultView.kt
+11
-18
No files found.
app/src/main/java/com/ydl/component/base/DemoGlobalConfig.java
View file @
4c425445
...
...
@@ -21,8 +21,8 @@ import java.util.List;
public
final
class
DemoGlobalConfig
implements
IConfigModule
{
String
APP_DOMAIN
=
"https://api.github.com/"
;
// public static String appEnv = YDLConstants.ENV_AUTO_TEST;
//
public static String appEnv = YDLConstants.ENV_TEST;
public
static
String
appEnv
=
YDLConstants
.
ENV_NEW_TEST
;
//配置未上传到maven库
public
static
String
appEnv
=
YDLConstants
.
ENV_TEST
;
//
public static String appEnv = YDLConstants.ENV_NEW_TEST;//配置未上传到maven库
// public static String appEnv = YDLConstants.ENV_PROD;
@Override
public
void
injectAppLifecycle
(
@NotNull
Context
context
,
@NotNull
List
<
IAppLifecycles
>
lifecycles
)
{
...
...
m-home/src/main/assets/home_data_xlzx.json
View file @
4c425445
This source diff could not be displayed because it is too large. You can
view the blob
instead.
m-home/src/xlzx/java/com/yidianling/home/ui/fragment/YdlHomeFragment.kt
View file @
4c425445
...
...
@@ -99,8 +99,8 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
}
private
fun
initAdapter
()
{
mPresenter
?.
localHomeData
(
mContext
!!
,
"home_data_xlzx.json"
)
adapter
=
YdlHomeAdapter
(
mContext
!!
,
homeEvent
!!
,
ArrayList
())
mPresenter
?.
localHomeData
(
mContext
,
"home_data_xlzx.json"
)
adapter
=
YdlHomeAdapter
(
mContext
,
homeEvent
!!
,
ArrayList
())
val
layoutManager
=
LinearLayoutManager
(
context
)
home_module_fragment_recycler
.
layoutManager
=
layoutManager
...
...
@@ -116,7 +116,7 @@ class YdlHomeFragment : BaseMvpFragment<IHomeContract.View, HomePresenterImpl>()
home_swipe_refresh_layout
.
setOnRefreshListener
(
this
)
home_swipe_refresh_layout
.
setColorSchemeColors
(
ContextCompat
.
getColor
(
mContext
!!
,
mContext
,
R
.
color
.
platform_main_theme
)
)
...
...
m-home/src/xlzx/java/com/yidianling/home/ui/view/HomeConsultView.kt
View file @
4c425445
...
...
@@ -101,10 +101,7 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
tab_layout
.
addOnTabSelectedListener
(
listener
!!
)
try
{
var
textView
=
tab_layout
.
getTabAt
(
0
)
as
TextView
if
(
textView
!=
null
&&
textView
is
TextView
)
{
updateText
(
textView
,
true
)
}
updateText
(
textView
,
true
)
}
catch
(
e
:
Exception
)
{}
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
M
)
{
tab_layout
.
setOnScrollChangeListener
{
v
,
scrollX
,
scrollY
,
oldScrollX
,
oldScrollY
->
...
...
@@ -133,12 +130,12 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
//创建HomeConsultItemView:每个tab最多显示四个专家
if
(
cacheInfoViewList
!!
.
size
>=
list
.
size
)
{
for
(
index
in
0
until
list
!!
.
size
)
{
for
(
index
in
list
.
indices
)
{
//设置数据
cacheInfoViewList
!!
[
index
].
setData
(
list
[
index
]
!!
,
list
[
index
],
index
,
index
==
list
!!
.
size
-
1
,
index
==
list
.
size
-
1
,
"${category?.id}"
)
cacheInfoViewList
!!
[
index
].
layoutParams
=
getViewLayoutParams
(
index
)
...
...
@@ -146,7 +143,7 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
ll_content
.
addView
(
cacheInfoViewList
!!
[
index
])
}
}
else
{
for
(
index
in
0
until
list
!!
.
size
)
{
for
(
index
in
list
.
indices
)
{
if
(
index
>
3
)
{
//只取前四条数据
break
...
...
@@ -158,9 +155,9 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
}
//设置数据
cacheInfoViewList
!!
[
index
].
setData
(
list
[
index
]
!!
,
list
[
index
],
index
,
index
==
list
!!
.
size
-
1
,
index
==
list
.
size
-
1
,
"${category?.id}"
)
cacheInfoViewList
!!
[
index
].
layoutParams
=
getViewLayoutParams
(
index
)
...
...
@@ -205,21 +202,17 @@ class HomeConsultView(private val mContext: Context, private var homeEvent: IHom
override
fun
onTabUnselected
(
tab
:
TabLayout
.
Tab
?)
{
var
textView
=
tabLayout
?.
getTabAt
(
tab
?.
position
!!
)
?.
customView
as
TextView
if
(
textView
!=
null
&&
textView
is
TextView
)
{
updateText
(
textView
,
false
)
}
updateText
(
textView
,
false
)
}
override
fun
onTabSelected
(
tab
:
TabLayout
.
Tab
?)
{
if
(
mLastPosition
==
tab
!!
.
position
)
{
return
}
var
textView
=
tabLayout
?.
getTabAt
(
tab
?.
position
!!
)
?.
customView
as
TextView
var
textView
=
tabLayout
?.
getTabAt
(
tab
.
position
)
?.
customView
as
TextView
if
(
textView
!=
null
&&
textView
is
TextView
)
{
updateText
(
textView
,
true
)
}
homeEvent
!!
.
getConsultData
(
list
!!
[
tab
!!
.
position
],
tab
!!
.
position
)
updateText
(
textView
,
true
)
homeEvent
!!
.
getConsultData
(
list
!!
[
tab
.
position
],
tab
.
position
)
}
}
...
...
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