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
f7358530
Commit
f7358530
authored
Jul 06, 2020
by
严久程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导医入口
parent
9a54da45
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
16 deletions
+46
-16
config.gradle
config.gradle
+3
-3
CourseNewListAdapter.java
m-course/src/main/java/com/yidianling/course/CourseNewListAdapter.java
+23
-4
CourseListContainerActivity.kt
m-course/src/main/java/com/yidianling/course/courseNew/courseList/CourseListContainerActivity.kt
+3
-0
CourseItemNewView.kt
m-course/src/main/java/com/yidianling/course/widget/CourseItemNewView.kt
+17
-8
item_course_new_list_view.xml
m-course/src/main/res/layout/item_course_new_list_view.xml
+0
-1
No files found.
config.gradle
View file @
f7358530
...
...
@@ -8,15 +8,15 @@ ext {
"m-confide"
:
"0.0.48.74"
,
"m-consultant"
:
"0.0.59.31"
,
"m-fm"
:
"0.0.30.00"
,
"m-user"
:
"0.0.60.2
2
"
,
"m-home"
:
"0.0.22.
2
0"
,
"m-user"
:
"0.0.60.2
3
"
,
"m-home"
:
"0.0.22.
3
0"
,
"m-im"
:
"0.0.18.15"
,
"m-dynamic"
:
"0.0.7.13"
,
"m-article"
:
"0.0.0.6"
,
"m-muse"
:
"0.0.28.20"
,
"m-tests"
:
"0.0.24.10"
,
"m-course"
:
"0.0.42.
9
"
,
"m-course"
:
"0.0.42.
14
"
,
//-------------- 业务模块 API 层 --------------
"m-audioim-api"
:
"0.0.6"
,
...
...
m-course/src/main/java/com/yidianling/course/CourseNewListAdapter.java
View file @
f7358530
...
...
@@ -18,6 +18,7 @@ public class CourseNewListAdapter extends CommonAdapter<Course> {
private
Context
context
;
private
int
guideImageIndex
=
0
;
private
int
lastPosition
=
0
;
private
List
<
GuideBean
>
guideList
=
new
ArrayList
<>();
public
CourseNewListAdapter
(
Context
context
)
{
...
...
@@ -33,6 +34,12 @@ public class CourseNewListAdapter extends CommonAdapter<Course> {
}
public
void
refreshLatPosition
()
{
lastPosition
=
0
;
guideImageIndex
=
0
;
}
@Override
public
View
getView
(
int
position
,
View
convertView
,
ViewGroup
parent
)
{
if
(
convertView
==
null
)
{
...
...
@@ -41,24 +48,36 @@ public class CourseNewListAdapter extends CommonAdapter<Course> {
((
CourseItemNewView
)
convertView
).
setData
(
mDataList
.
get
(
position
));
((
CourseItemNewView
)
convertView
).
setBottomLineVisible
();
if
((
position
+
1
)
%
10
==
0
)
{
GuideBean
bean
=
getGuideData
();
GuideBean
bean
=
getGuideData
(
position
);
if
(
bean
!=
null
)
{
((
CourseItemNewView
)
convertView
).
setGuideData
(
bean
);
((
CourseItemNewView
)
convertView
).
setGuideData
(
bean
.
pic
,
bean
.
location
);
}
}
else
{
((
CourseItemNewView
)
convertView
).
setGuideGone
();
}
return
convertView
;
}
private
GuideBean
getGuideData
()
{
private
GuideBean
getGuideData
(
int
position
)
{
if
(
guideList
.
size
()
==
0
)
{
return
null
;
}
if
(
position
%
3
==
0
)
{
guideImageIndex
=
0
;
}
if
(
position
%
3
==
1
)
{
guideImageIndex
=
1
;
}
if
(
position
%
3
==
2
)
{
guideImageIndex
=
2
;
}
GuideBean
bean
=
null
;
if
(
guideImageIndex
>=
guideList
.
size
()
-
1
)
{
guideImageIndex
=
0
;
}
bean
=
guideList
.
get
(
guideImageIndex
);
guideImageIndex
++;
return
bean
;
}
...
...
m-course/src/main/java/com/yidianling/course/courseNew/courseList/CourseListContainerActivity.kt
View file @
f7358530
...
...
@@ -474,6 +474,9 @@ class CourseListContainerActivity : BaseActivity(), PtrHandler, LoadMoreHandler
}
else
{
page
=
1
hasMore
=
true
if
(
adapter
!=
null
){
adapter
?.
refreshLatPosition
()
}
}
getCourses
(
loadMore
)
}
...
...
m-course/src/main/java/com/yidianling/course/widget/CourseItemNewView.kt
View file @
f7358530
...
...
@@ -18,16 +18,12 @@ import com.ydl.media.view.PlayerFloatHelper
import
com.ydl.media.view.PlayerFloatView
import
com.ydl.webview.H5Params
import
com.ydl.webview.NewH5Activity
import
com.ydl.ydl_image.config.ISimpleImageOpConfig
import
com.ydl.ydl_image.config.SimpleImageOpConfiger
import
com.ydl.ydl_image.manager.YDLImageCacheManager
import
com.ydl.ydl_image.module.GlideApp
import
com.ydl.ydlcommon.modular.ModularServiceManager.provide
import
com.ydl.ydlcommon.utils.actionutil.ActionCountUtils
import
com.yidianling.common.tools.RxImageTool
import
com.yidianling.common.tools.ToastUtil
import
com.yidianling.consultant.api.IConsultantService
import
com.yidianling.consultant.bean.GuideBean
import
com.yidianling.course.CourseConstants
import
com.yidianling.course.R
import
com.yidianling.course.bean.Course
...
...
@@ -77,7 +73,6 @@ class CourseItemNewView : ConstraintLayout {
}
}
iv_guide_image
.
visibility
=
View
.
GONE
GlideApp
.
with
(
mContext
)
.
load
(
headUrl
)
.
into
(
iv_head
)
...
...
@@ -250,19 +245,33 @@ class CourseItemNewView : ConstraintLayout {
}
fun
setGuideData
(
bean
:
GuideBean
)
{
fun
setGuideData
(
pic
:
String
,
location
:
String
)
{
view_bottom_line
.
visibility
=
View
.
INVISIBLE
iv_guide_image
.
visibility
=
View
.
VISIBLE
GlideApp
.
with
(
mContext
)
.
load
(
bean
.
pic
)
.
load
(
pic
)
.
into
(
iv_guide_image
)
iv_guide_image
.
setOnClickListener
{
provide
(
IConsultantService
::
class
.
java
).
jumpConsultAssistant
(
mContext
as
Activity
,
bean
.
location
.
toInt
())
provide
(
IConsultantService
::
class
.
java
).
jumpConsultAssistant
(
mContext
as
Activity
,
location
.
toInt
()
)
}
}
fun
setGuideGone
(){
iv_guide_image
.
visibility
=
View
.
GONE
}
fun
isGuideVisible
():
Boolean
{
return
iv_guide_image
.
visibility
==
View
.
VISIBLE
}
private
fun
playMedia
()
{
if
(
PlayerFloatHelper
.
isShow
(
mContext
))
{
PlayerFloatHelper
.
hide
()
...
...
m-course/src/main/res/layout/item_course_new_list_view.xml
View file @
f7358530
...
...
@@ -241,7 +241,6 @@
android:layout_height=
"90dp"
android:visibility=
"gone"
android:layout_marginTop=
"20dp"
tools:visibility=
"visible"
app:pa_borderRadius=
"8dp"
app:pa_type=
"pa_round"
android:layout_marginStart=
"2dp"
...
...
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