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
0490b409
Commit
0490b409
authored
Nov 20, 2019
by
洪国微
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
a869a115
5e882a13
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
13 deletions
+36
-13
config.gradle
config.gradle
+1
-1
CoursePlayItemViewVideo.kt
m-course/src/main/java/com/yidianling/course/coursePlay/CoursePlayItemViewVideo.kt
+5
-5
CourseSearchActicity.kt
m-course/src/main/java/com/yidianling/course/courseSearch/CourseSearchActicity.kt
+22
-7
course_videoplay_view.xml
m-course/src/main/res/layout/course_videoplay_view.xml
+8
-0
No files found.
config.gradle
View file @
0490b409
...
@@ -44,7 +44,7 @@ ext {
...
@@ -44,7 +44,7 @@ ext {
//第三步 若干
//第三步 若干
"m-confide"
:
"0.0.18"
,
"m-confide"
:
"0.0.18"
,
"m-consultant"
:
"0.0.27"
,
"m-consultant"
:
"0.0.27"
,
"m-course"
:
"0.0.
17
"
,
"m-course"
:
"0.0.
21
"
,
"m-fm"
:
"0.0.15"
,
"m-fm"
:
"0.0.15"
,
"m-muse"
:
"0.0.11"
,
"m-muse"
:
"0.0.11"
,
"m-tests"
:
"0.0.9"
,
"m-tests"
:
"0.0.9"
,
...
...
m-course/src/main/java/com/yidianling/course/coursePlay/CoursePlayItemViewVideo.kt
View file @
0490b409
...
@@ -12,6 +12,7 @@ import com.ydl.media.audio.utils.PlayProgressUtil
...
@@ -12,6 +12,7 @@ import com.ydl.media.audio.utils.PlayProgressUtil
import
com.ydl.media.view.PlayTypeEnum
import
com.ydl.media.view.PlayTypeEnum
import
com.ydl.media.view.PlayerFloatHelper
import
com.ydl.media.view.PlayerFloatHelper
import
com.ydl.ydl_image.module.GlideApp
import
com.ydl.ydl_image.module.GlideApp
import
com.ydl.ydlcommon.utils.LogUtil
import
com.ydl.ydlcommon.view.dialog.CommonDialog
import
com.ydl.ydlcommon.view.dialog.CommonDialog
import
com.yidianling.course.R
import
com.yidianling.course.R
import
com.yidianling.course.bean.CourseExtraBean
import
com.yidianling.course.bean.CourseExtraBean
...
@@ -173,7 +174,7 @@ class CoursePlayItemViewVideo : RelativeLayout, PlayViewInterface {
...
@@ -173,7 +174,7 @@ class CoursePlayItemViewVideo : RelativeLayout, PlayViewInterface {
.
forbidTouch
(
false
)
.
forbidTouch
(
false
)
.
setOnInfoListener
(
object
:
IMediaPlayer
.
OnInfoListener
{
.
setOnInfoListener
(
object
:
IMediaPlayer
.
OnInfoListener
{
override
fun
onInfo
(
mp
:
IMediaPlayer
,
what
:
Int
,
extra
:
Int
):
Boolean
{
override
fun
onInfo
(
mp
:
IMediaPlayer
,
what
:
Int
,
extra
:
Int
):
Boolean
{
LogUtil
.
e
(
"课程播放--状态-$what"
)
if
(
what
==
PlayStateParams
.
STATE_PAUSED
)
{
if
(
what
==
PlayStateParams
.
STATE_PAUSED
)
{
this
@CoursePlayItemViewVideo
.
findViewById
<
View
>(
R
.
id
.
rl_play_pause_layout
).
visibility
=
View
.
VISIBLE
this
@CoursePlayItemViewVideo
.
findViewById
<
View
>(
R
.
id
.
rl_play_pause_layout
).
visibility
=
View
.
VISIBLE
}
else
{
}
else
{
...
@@ -187,13 +188,12 @@ class CoursePlayItemViewVideo : RelativeLayout, PlayViewInterface {
...
@@ -187,13 +188,12 @@ class CoursePlayItemViewVideo : RelativeLayout, PlayViewInterface {
||
what
==
PlayStateParams
.
MEDIA_INFO_AUDIO_RENDERING_START
||
what
==
PlayStateParams
.
MEDIA_INFO_AUDIO_RENDERING_START
||
what
==
PlayStateParams
.
MEDIA_INFO_VIDEO_RENDERING_START
||
what
==
PlayStateParams
.
MEDIA_INFO_VIDEO_RENDERING_START
||
what
==
PlayStateParams
.
STATE_PLAYING
||
what
==
PlayStateParams
.
STATE_PLAYING
||
what
==
IMediaPlayer
.
MEDIA_INFO_VIDEO_SEEK_RENDERING_START
)
{
)
{
activity
?.
isVideoPlay
=
true
activity
?.
isVideoPlay
=
true
this
@CoursePlayItemViewVideo
.
findViewById
<
View
>(
R
.
id
.
ll_bg
).
visibility
=
View
.
GONE
this
@CoursePlayItemViewVideo
.
findViewById
<
View
>(
R
.
id
.
ll_bg
).
visibility
=
View
.
GONE
}
else
{
this
@CoursePlayItemViewVideo
.
findViewById
<
View
>(
R
.
id
.
ll_loading
).
visibility
=
View
.
GONE
mHandler
.
postDelayed
({
this
@CoursePlayItemViewVideo
.
findViewById
<
View
>(
R
.
id
.
app_video_loading
).
visibility
=
View
.
GONE
this
@CoursePlayItemViewVideo
.
findViewById
<
View
>(
R
.
id
.
ll_bg
).
visibility
=
View
.
VISIBLE
},
550
)
}
}
if
(
what
==
PlayStateParams
.
STATE_COMPLETED
)
{
if
(
what
==
PlayStateParams
.
STATE_COMPLETED
)
{
...
...
m-course/src/main/java/com/yidianling/course/courseSearch/CourseSearchActicity.kt
View file @
0490b409
...
@@ -97,7 +97,9 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
...
@@ -97,7 +97,9 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
private
fun
initSearchBar
()
{
private
fun
initSearchBar
()
{
window
.
setSoftInputMode
(
WindowManager
.
LayoutParams
.
SOFT_INPUT_STATE_VISIBLE
)
window
.
setSoftInputMode
(
WindowManager
.
LayoutParams
.
SOFT_INPUT_STATE_VISIBLE
)
activity_course_search_search_bar_view
.
initBarType
(
SearchBarView
.
ENABLE_INPUT
,
object
:
SearchBarView
.
SearchCallBack
{
activity_course_search_search_bar_view
.
initBarType
(
SearchBarView
.
ENABLE_INPUT
,
object
:
SearchBarView
.
SearchCallBack
{
override
fun
cloase
()
{
override
fun
cloase
()
{
finish
()
finish
()
}
}
...
@@ -111,9 +113,11 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
...
@@ -111,9 +113,11 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
}
}
loadCourseList
(
true
)
loadCourseList
(
true
)
}
}
})
RxKeyboardTool
.
showSoftInput
(
this
,
activity_course_search_search_bar_view
.
getEditText
())
})
activity_course_search_search_bar_view
.
postDelayed
({
RxKeyboardTool
.
showSoftInput
(
this
,
activity_course_search_search_bar_view
.
getEditText
())
},
500
)
}
}
/**
/**
...
@@ -130,7 +134,8 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
...
@@ -130,7 +134,8 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
*/
*/
private
fun
initRecyclerView
()
{
private
fun
initRecyclerView
()
{
if
(
null
==
courseSearchAdapterWrapper
)
{
if
(
null
==
courseSearchAdapterWrapper
)
{
courseSearchAdapter
=
CourseSearchAdapter
(
this
,
CourseSearchActicity
@
this
,
courseList
!!
)
courseSearchAdapter
=
CourseSearchAdapter
(
this
,
CourseSearchActicity
@
this
,
courseList
!!
)
courseSearchAdapter
!!
.
setOnItemClickListener
(
this
)
courseSearchAdapter
!!
.
setOnItemClickListener
(
this
)
activity_course_search_recycler
.
layoutManager
=
LinearLayoutManager
(
this
)
activity_course_search_recycler
.
layoutManager
=
LinearLayoutManager
(
this
)
...
@@ -138,7 +143,8 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
...
@@ -138,7 +143,8 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
this
,
this
,
courseSearchAdapter
!!
,
courseSearchAdapter
!!
,
20
,
20
,
activity_course_search_recycler
)
activity_course_search_recycler
)
.
setOnLoadMoreListener
(
object
:
CourseSearchAdapterWrapper
.
OnLoadMoreListener
{
.
setOnLoadMoreListener
(
object
:
CourseSearchAdapterWrapper
.
OnLoadMoreListener
{
override
fun
onLoadMore
()
{
override
fun
onLoadMore
()
{
loadCourseList
(
false
)
loadCourseList
(
false
)
...
@@ -146,7 +152,11 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
...
@@ -146,7 +152,11 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
})
})
activity_course_search_recycler
.
adapter
=
courseSearchAdapterWrapper
activity_course_search_recycler
.
adapter
=
courseSearchAdapterWrapper
//滑动监听 图片是否加载
//滑动监听 图片是否加载
activity_course_search_recycler
.
addOnScrollListener
(
YDLImageRecyclerOnScrollListener
(
CourseSearchActicity
@
this
))
activity_course_search_recycler
.
addOnScrollListener
(
YDLImageRecyclerOnScrollListener
(
CourseSearchActicity
@
this
)
)
loadCourseList
(
true
)
loadCourseList
(
true
)
}
}
}
}
...
@@ -159,7 +169,12 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
...
@@ -159,7 +169,12 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
if
(
null
!=
courseItem
)
{
if
(
null
!=
courseItem
)
{
val
h5Params
=
H5Params
(
CourseConstants
.
COURSE_DETAIL_H5
+
courseItem
.
id
,
"课程详情"
)
val
h5Params
=
H5Params
(
CourseConstants
.
COURSE_DETAIL_H5
+
courseItem
.
id
,
"课程详情"
)
if
(
null
!=
courseItem
.
share
&&
!
TextUtils
.
isEmpty
(
courseItem
.
share
.
share_url
))
{
if
(
null
!=
courseItem
.
share
&&
!
TextUtils
.
isEmpty
(
courseItem
.
share
.
share_url
))
{
val
shareData
=
ShareData
(
courseItem
.
share
.
share_url
,
courseItem
.
share
.
title
,
courseItem
.
share
.
cover
,
courseItem
.
share
.
desc
)
val
shareData
=
ShareData
(
courseItem
.
share
.
share_url
,
courseItem
.
share
.
title
,
courseItem
.
share
.
cover
,
courseItem
.
share
.
desc
)
h5Params
.
shareData
=
shareData
h5Params
.
shareData
=
shareData
}
}
...
...
m-course/src/main/res/layout/course_videoplay_view.xml
View file @
0490b409
...
@@ -85,6 +85,12 @@
...
@@ -85,6 +85,12 @@
<!--加载中-->
<!--加载中-->
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_loading"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:visibility=
"visible"
>
<LinearLayout
android:id=
"@+id/app_video_loading"
android:id=
"@+id/app_video_loading"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
...
@@ -108,6 +114,8 @@
...
@@ -108,6 +114,8 @@
android:textColor=
"@android:color/white"
android:textColor=
"@android:color/white"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- 中间触摸提示-->
<!-- 中间触摸提示-->
<include
<include
...
...
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