Commit 36c2dd67 by 严久程

课程\fm

parent 5892c62e
......@@ -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 {
......
......@@ -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()
}
......@@ -112,8 +114,9 @@ class CourseSearchActivity : BaseActivity(), CourseSearchAdapter.OnItemClick, IC
loadCourseList(true)
}
})
RxKeyboardTool.showSoftInput(this,)
activity_course_search_search_bar_view.postDelayed({
RxKeyboardTool.showSoftInput(this, activity_course_search_search_bar_view.getEditText())
},500)
}
/**
......@@ -130,7 +133,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 +142,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 +151,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 +168,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
}
......
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