Commit 0490b409 by 洪国微

merge

parents a869a115 5e882a13
......@@ -44,7 +44,7 @@ ext {
//第三步 若干
"m-confide" : "0.0.18",
"m-consultant" : "0.0.27",
"m-course" : "0.0.17",
"m-course" : "0.0.21",
"m-fm" : "0.0.15",
"m-muse" : "0.0.11",
"m-tests" : "0.0.9",
......
......@@ -12,6 +12,7 @@ import com.ydl.media.audio.utils.PlayProgressUtil
import com.ydl.media.view.PlayTypeEnum
import com.ydl.media.view.PlayerFloatHelper
import com.ydl.ydl_image.module.GlideApp
import com.ydl.ydlcommon.utils.LogUtil
import com.ydl.ydlcommon.view.dialog.CommonDialog
import com.yidianling.course.R
import com.yidianling.course.bean.CourseExtraBean
......@@ -173,7 +174,7 @@ class CoursePlayItemViewVideo : RelativeLayout, PlayViewInterface {
.forbidTouch(false)
.setOnInfoListener(object : IMediaPlayer.OnInfoListener {
override fun onInfo(mp: IMediaPlayer, what: Int, extra: Int): Boolean {
LogUtil.e("课程播放--状态-$what")
if (what == PlayStateParams.STATE_PAUSED) {
this@CoursePlayItemViewVideo.findViewById<View>(R.id.rl_play_pause_layout).visibility = View.VISIBLE
} else {
......@@ -187,13 +188,12 @@ class CoursePlayItemViewVideo : RelativeLayout, PlayViewInterface {
|| what == PlayStateParams.MEDIA_INFO_AUDIO_RENDERING_START
|| what == PlayStateParams.MEDIA_INFO_VIDEO_RENDERING_START
|| what == PlayStateParams.STATE_PLAYING
|| what == IMediaPlayer.MEDIA_INFO_VIDEO_SEEK_RENDERING_START
) {
activity?.isVideoPlay = true
this@CoursePlayItemViewVideo.findViewById<View>(R.id.ll_bg).visibility = View.GONE
} else {
mHandler.postDelayed({
this@CoursePlayItemViewVideo.findViewById<View>(R.id.ll_bg).visibility = View.VISIBLE
}, 550)
this@CoursePlayItemViewVideo.findViewById<View>(R.id.ll_loading).visibility = View.GONE
this@CoursePlayItemViewVideo.findViewById<View>(R.id.app_video_loading).visibility = View.GONE
}
if (what == PlayStateParams.STATE_COMPLETED) {
......
......@@ -97,7 +97,9 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
private fun initSearchBar() {
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() {
finish()
}
......@@ -111,9 +113,11 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
}
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
*/
private fun initRecyclerView() {
if (null == courseSearchAdapterWrapper) {
courseSearchAdapter = CourseSearchAdapter(this, CourseSearchActicity@ this, courseList!!)
courseSearchAdapter =
CourseSearchAdapter(this, CourseSearchActicity@ this, courseList!!)
courseSearchAdapter!!.setOnItemClickListener(this)
activity_course_search_recycler.layoutManager = LinearLayoutManager(this)
......@@ -138,7 +143,8 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
this,
courseSearchAdapter!!,
20,
activity_course_search_recycler)
activity_course_search_recycler
)
.setOnLoadMoreListener(object : CourseSearchAdapterWrapper.OnLoadMoreListener {
override fun onLoadMore() {
loadCourseList(false)
......@@ -146,7 +152,11 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
})
activity_course_search_recycler.adapter = courseSearchAdapterWrapper
//滑动监听 图片是否加载
activity_course_search_recycler.addOnScrollListener(YDLImageRecyclerOnScrollListener(CourseSearchActicity@ this))
activity_course_search_recycler.addOnScrollListener(
YDLImageRecyclerOnScrollListener(
CourseSearchActicity@ this
)
)
loadCourseList(true)
}
}
......@@ -159,7 +169,12 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
if (null != courseItem) {
val h5Params = H5Params(CourseConstants.COURSE_DETAIL_H5 + courseItem.id, "课程详情")
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
}
......
......@@ -85,6 +85,12 @@
<!--加载中-->
<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:layout_width="match_parent"
android:layout_height="match_parent"
......@@ -108,6 +114,8 @@
android:textColor="@android:color/white"
android:visibility="gone" />
</LinearLayout>
</LinearLayout>
<!-- 中间触摸提示-->
<include
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment