作者 liyan

课程视频添加

正在显示 28 个修改的文件 包含 839 行增加3 行删除
... ... @@ -84,4 +84,9 @@ dependencies {
implementation 'com.android.support:multidex:1.0.3'
implementation 'io.github.youth5201314:banner:2.2.2'
//完整版引入
implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer:v8.1.5-jitpack'
}
\ No newline at end of file
... ...
... ... @@ -73,6 +73,7 @@
<activity android:name=".ui.home.activity.TextCourseActivity" />
<activity android:name=".ui.home.activity.TextDetailActivity" />
<activity android:name=".ui.home.activity.OnlineActivity" />
<activity android:name=".ui.home.activity.OnlineDetailActivity"/>
</application>
... ...
package com.wjx.android.wanandroidmvvm.base.view
import android.app.Activity
import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.os.PersistableBundle
import android.text.TextUtils
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Toast
import androidx.appcompat.widget.Toolbar
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import androidx.viewbinding.ViewBinding
import com.br_technology.securitytrain_master.R
import com.br_technology.securitytrain_master.base.common.CommonUtil
import com.br_technology.securitytrain_master.base.common.State
import com.br_technology.securitytrain_master.base.common.StateType
import com.br_technology.securitytrain_master.expand.statusBarHeight
import com.br_technology.securitytrain_master.util.AppManager
import com.br_technology.securitytrain_master.util.RevealUtil.setReveal
import com.gyf.immersionbar.ImmersionBar
import com.kingja.loadsir.callback.SuccessCallback
import com.kingja.loadsir.core.LoadService
import com.kingja.loadsir.core.LoadSir
import com.shuyu.gsyvideoplayer.GSYBaseADActivityDetail
import com.shuyu.gsyvideoplayer.GSYBaseActivityDetail
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel
import com.wjx.android.wanandroidmvvm.common.callback.EmptyCallBack
import com.wjx.android.wanandroidmvvm.common.callback.ErrorCallBack
import com.wjx.android.wanandroidmvvm.common.callback.LoadingCallBack
/**
* Created with Android Studio.
* Description:
* @author: Wangjianxian
* @date: 2020/02/22
* Time: 16:30
*/
abstract class BaseVideoLifeCycleActivity<VM : BaseViewModel<*>, VB : ViewBinding>(private val inflate: (LayoutInflater) -> VB) :
GSYBaseActivityDetail<StandardGSYVideoPlayer>() {
protected lateinit var mViewModel: VM
lateinit var binding: VB
private var mExitTime: Long = 0
lateinit var mRootView: View
val loadService: LoadService<*> by lazy {
LoadSir.getDefault().register(this) {
reLoad()
}
}
open fun showCreateReveal(): Boolean = true
open fun showDestroyReveal(): Boolean = false
open fun initData() {}
open fun reLoad() {}
override fun onCreate(savedInstanceState: Bundle?) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
val modes = window.windowManager.defaultDisplay.supportedModes
modes.sortBy {
it.refreshRate
}
window.let {
val layoutParam = it.attributes
layoutParam.preferredDisplayModeId = modes.last().modeId
it.attributes = layoutParam
}
}
super.onCreate(savedInstanceState)
binding = inflate(layoutInflater)
setContentView(binding.root)
mRootView = (findViewById(android.R.id.content) as ViewGroup).getChildAt(0)
AppManager.instance.addActivity(this)
initView()
initData()
if (showCreateReveal()) {
setUpReveal(savedInstanceState)
}
// EventBus.getDefault().register(this)
ImmersionBar.with(this).transparentStatusBar().statusBarDarkFont(false).init()
// .transparentNavigationBar() //透明导航栏,不写默认黑色(设置此方法,fullScreen()方法自动为true)
// .transparentBar().navigationBarDarkIcon(true)
}
fun setUpReveal(savedInstanceState: Bundle?) {
setReveal(savedInstanceState)
}
override fun onDestroy() {
super.onDestroy()
// EventBus.getDefault().unregister(this)
AppManager.instance.removeActivity(this)
}
override fun onPause() {
super.onPause()
if (showDestroyReveal()) {
// circularFinishReveal(mRootView)
}
}
override fun finish() {
super.finish()
// if (showDestroyReveal()) {
// overridePendingTransition(R.anim.alpha_in, R.anim.alpha_out)
// } else {
// overridePendingTransition(
// R.anim.animo_alph_open,
// R.anim.animo_alph_close
// )
// }
}
protected fun startActivity(activity: Class<out Activity>) {
startActivity(activity, null)
}
protected fun startActivity(activity: Class<out Activity>, bundle: Bundle?) {
val intent = Intent(this, activity)
if (bundle != null) {
intent.putExtras(bundle)
}
startActivity(intent)
}
fun initView() {
val statusBar: Toolbar? = binding.root.findViewById(R.id.status_bar)
statusBar?.post {
val layoutParams = statusBar.layoutParams
layoutParams.height = statusBar.statusBarHeight()
statusBar.layoutParams = layoutParams
}
showLoading()
mViewModel = ViewModelProvider(this).get(CommonUtil.getClass(this))
mViewModel.loadState.observe(this, observer)
// 初始化View的Observer
initDataObserver()
}
abstract fun initDataObserver()
open fun showLoading() {
// loadService.showCallback(LoadingCallBack::class.java)
}
open fun showSuccess() {
// loadService.showCallback(SuccessCallback::class.java)
}
open fun showError(msg: String) {
if (!TextUtils.isEmpty(msg)) {
Toast.makeText(this, msg, Toast.LENGTH_SHORT).show()
}
// loadService.showCallback(ErrorCallBack::class.java)
}
open fun showTip(msg: String) {
// if (!TextUtils.isEmpty(msg)) {
// MaterialDialog(this).show {
// title(R.string.title)
// message(text = msg)
// cornerRadius(8.0f)
// negativeButton(R.string.done)
// }
// false
// }
// loadService.showCallback(SuccessCallback::class.java)
}
open fun showEmpty() {
// loadService.showCallback(EmptyCallBack::class.java)
}
/**
* 分发应用状态
*/
private val observer by lazy {
Observer<State> {
it?.let {
when (it.code) {
StateType.SUCCESS -> showSuccess()
StateType.LOADING -> showLoading()
StateType.ERROR -> showTip(it.message)
StateType.NETWORK_ERROR -> showError("网络出现问题啦")
StateType.TIP -> showTip(it.message)
StateType.EMPTY -> showEmpty()
}
}
}
}
}
\ No newline at end of file
... ...
... ... @@ -6,7 +6,6 @@ import com.br_technology.securitytrain_master.ui.home.adapter.PdfAdapter
import com.br_technology.securitytrain_master.ui.home.viewmodel.DatabaseDetailViewModel
import com.br_technology.securitytrain_master.view.listener.OnItemClickListener
import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity
import java.net.URLEncoder
/**
* createTime:2021/7/29 10:43
... ...
... ... @@ -7,9 +7,11 @@ import com.br_technology.securitytrain_master.R
import com.br_technology.securitytrain_master.databinding.ActivityOnlineBinding
import com.br_technology.securitytrain_master.expand.addItemDecoration2
import com.br_technology.securitytrain_master.ui.home.adapter.VideoCourseAdapter
import com.br_technology.securitytrain_master.ui.home.pojo.RecommendData
import com.br_technology.securitytrain_master.ui.home.pojo.VideoCourse
import com.br_technology.securitytrain_master.ui.home.viewmodel.OnlineViewModel
import com.br_technology.securitytrain_master.view.ClassifyPop
import com.br_technology.securitytrain_master.view.listener.OnItemClickListener
import com.br_technology.securitytrain_master.view.listener.ToolBarClickListener
import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity
... ... @@ -62,6 +64,14 @@ class OnlineActivity :
)
onlineRecycler.adapter = videoCourseAdapter
videoCourseAdapter.addList(list)
videoCourseAdapter.addListener(object : OnItemClickListener<VideoCourse>{
override fun onClick(position: Int, data: VideoCourse) {
startActivity(OnlineDetailActivity :: class.java)
}
})
}
}
... ...
package com.br_technology.securitytrain_master.ui.home.activity
import android.content.pm.ActivityInfo
import android.content.res.Configuration
import android.view.View
import android.view.WindowManager
import androidx.fragment.app.FragmentPagerAdapter
import com.br_technology.securitytrain_master.databinding.ActivityOnlineDetailBinding
import com.br_technology.securitytrain_master.ui.home.adapter.ResultPagerAdapter
import com.br_technology.securitytrain_master.ui.home.fragment.CourseListFragment
import com.br_technology.securitytrain_master.ui.home.fragment.OnlineDetailFragment
import com.br_technology.securitytrain_master.ui.home.viewmodel.OnlineDetailViewModel
import com.shuyu.gsyvideoplayer.GSYVideoManager
import com.shuyu.gsyvideoplayer.builder.GSYVideoOptionBuilder
import com.shuyu.gsyvideoplayer.listener.GSYSampleCallBack
import com.shuyu.gsyvideoplayer.listener.LockClickListener
import com.shuyu.gsyvideoplayer.utils.Debuger
import com.shuyu.gsyvideoplayer.utils.OrientationUtils
import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleActivity
/**
* Time: 7/30/2021 13:56
* Author: Captain
* Description: 初见时你很迷人
*/
class OnlineDetailActivity
: BaseLifeCycleActivity<OnlineDetailViewModel, ActivityOnlineDetailBinding>(
ActivityOnlineDetailBinding::inflate
) {
var orientationUtils: OrientationUtils ? =null
override fun initDataObserver() {
}
var isPlay : Boolean = false
override fun initData() {
super.initData()
binding.apply {
val searchResultAdapter = ResultPagerAdapter(
supportFragmentManager,
FragmentPagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT
)
val list =
listOf(OnlineDetailFragment(), CourseListFragment())
val titles = listOf("课程详情", "课程列表")
searchResultAdapter.addData(list)
searchResultAdapter.addTitle(titles)
viewPager.adapter = searchResultAdapter
tabLayout.setupWithViewPager(viewPager)
// val source1 =
// "http://9890.vod.myqcloud.com/9890_4e292f9a3dd011e6b4078980237cc3d3.f20.mp4"
// videoPlayer.setUp(source1, true, "测试视频")
//增加封面
//增加title
// videoPlayer.titleTextView.visibility = View.VISIBLE
// //设置返回键
// videoPlayer.backButton.visibility = View.VISIBLE
//设置旋转
orientationUtils = OrientationUtils(this@OnlineDetailActivity, videoPlayer)
val gsyVideoOption = GSYVideoOptionBuilder()
gsyVideoOption
.setIsTouchWiget(true)
.setRotateViewAuto(false)
.setLockLand(false)
.setAutoFullWithSize(true)
.setShowFullAnimation(false)
.setNeedLockFull(true)
.setUrl("http://9890.vod.myqcloud.com/9890_4e292f9a3dd011e6b4078980237cc3d3.f20.mp4")
.setCacheWithPlay(false)
.setVideoTitle("测试视频")
.setVideoAllCallBack(object : GSYSampleCallBack() {
override fun onPrepared(url: String?, vararg objects: Any?) {
super.onPrepared(url, *objects)
//开始播放了才能旋转和全屏
orientationUtils!!.setEnable(true);
isPlay = true;
}
override fun onQuitFullscreen(url: String?, vararg objects: Any?) {
super.onQuitFullscreen(url, *objects)
Debuger.printfError("***** onQuitFullscreen **** " + objects[0]);//title
Debuger.printfError("***** onQuitFullscreen **** " + objects[1]);//当前非全屏player
if (orientationUtils != null) {
orientationUtils!!.backToProtVideo();
}
}
}).setLockClickListener(object : LockClickListener {
override fun onClick(view: View?, lock: Boolean) {
if (orientationUtils != null) {
//配合下方的onConfigurationChanged
orientationUtils!!.setEnable(!lock);
}
}
}).build(videoPlayer)
videoPlayer.fullscreenButton.setOnClickListener { //直接横屏
toolBar.visibility = View.GONE
// getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
orientationUtils!!.resolveByClick()
//第一个true是否需要隐藏actionbar,第二个true是否需要隐藏statusbar
videoPlayer.startWindowFullscreen(this@OnlineDetailActivity, false, false)
}
//设置全屏按键功能,这是使用的是选择屏幕,而不是全屏
// videoPlayer.fullscreenButton.setOnClickListener({
//// orientationUtils!!.resolveByClick()
//
// videoPlayer.startWindowFullscreen(this@OnlineDetailActivity, true, true);
// })
//是否可以滑动调整
videoPlayer.setIsTouchWiget(true)
//设置返回按键功能
videoPlayer.backButton.visibility = View.GONE
videoPlayer.startButton.setOnClickListener({
videoPlayer.startPlayLogic()
})
}
}
override fun onDestroy() {
super.onDestroy()
GSYVideoManager.releaseAllVideos();
if (orientationUtils != null)
orientationUtils!!.releaseListener();
}
// override fun getGSYVideoPlayer(): StandardGSYVideoPlayer {
// return binding.videoPlayer
// }
//
// override fun getGSYVideoOptionBuilder(): GSYVideoOptionBuilder {
////内置封面可参考SampleCoverVideo
// //内置封面可参考SampleCoverVideo
// val imageView = ImageView(this)
//// loadCover(imageView, url)
// return GSYVideoOptionBuilder()
// .setThumbImageView(imageView)
// .setUrl("https://stream7.iqilu.com/10339/upload_transcode/202002/18/20200218114723HDu3hhxqIT.mp4")
// .setCacheWithPlay(true)
// .setVideoTitle(" ")
// .setIsTouchWiget(true)
// .setRotateViewAuto(false)
// .setLockLand(false)
// .setShowFullAnimation(false)
// .setNeedLockFull(true)
// .setSeekRatio(1f)
// }
//
// override fun clickForFullScreen() {
//
// }
//
// override fun getDetailOrientationRotateAuto(): Boolean {
// return false
// }
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
// 横屏
if (newConfig.orientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
binding.toolBar.visibility=View.GONE
}else{
binding.toolBar.visibility=View.VISIBLE
}
}
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.home.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import com.br_technology.securitytrain_master.base.view.BaseAdapter
import com.br_technology.securitytrain_master.databinding.AdapterVideoCourseBinding
import com.br_technology.securitytrain_master.databinding.ItemVideoCourseBinding
import com.br_technology.securitytrain_master.expand.courseHead
import com.br_technology.securitytrain_master.expand.glideRound
import com.br_technology.securitytrain_master.ui.home.pojo.VideoCourse
/**
* createTime:2021/7/28 8:42
* auth:张继
* des:
*/
class VideoCourseListAdapter :
BaseAdapter<VideoCourse, ItemVideoCourseBinding>() {
override fun onBind(holder: ItemVideoCourseBinding, position: Int, data: VideoCourse) {
// 视频名称
holder.tvTitle.text = data.courseName
holder.tvPlay.text = data.lesson
holder.tvNum.text = data.head
}
override fun getViewBinding(
context: Context,
parent: ViewGroup,
viewType: Int,
from: LayoutInflater
): ItemVideoCourseBinding {
return ItemVideoCourseBinding.inflate(from, parent, false)
}
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.home.fragment
import androidx.recyclerview.widget.LinearLayoutManager
import com.br_technology.securitytrain_master.R
import com.br_technology.securitytrain_master.databinding.FragmentCourseListBinding
import com.br_technology.securitytrain_master.ui.home.adapter.VideoCourseAdapter
import com.br_technology.securitytrain_master.ui.home.adapter.VideoCourseListAdapter
import com.br_technology.securitytrain_master.ui.home.pojo.VideoCourse
import com.br_technology.securitytrain_master.ui.home.viewmodel.CourseListViewModel
import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleFragment
/**
* Time: 7/30/2021 16:08
* Author: Captain
* Description: 初见时你很迷人
*/
class CourseListFragment
: BaseLifeCycleFragment<CourseListViewModel,FragmentCourseListBinding>(FragmentCourseListBinding::inflate) {
override fun initDataObserver() {
}
override fun initData() {
super.initData()
binding.apply {
val videoCourseListAdapter = VideoCourseListAdapter()
val list = mutableListOf(
VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "1.1", "张钧-三岗职位培训班"),
VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "1.1", "张钧-三岗职位培训班"),
VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "1.1", "张钧-三岗职位培训班"),
VideoCourse(R.mipmap.banner, "01:45:00", "自动化制作课程", "1.1", "张钧-三岗职位培训班"),
)
recyclerview.adapter = videoCourseListAdapter
videoCourseListAdapter.addList(list)
}
}
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.home.fragment
import android.widget.TextView
import androidx.core.content.ContextCompat
import com.br_technology.securitytrain_master.R
import com.br_technology.securitytrain_master.databinding.FragmentOnlineDetailBinding
import com.br_technology.securitytrain_master.ui.home.viewmodel.OnlineDetailFragmentViewModel
import com.wjx.android.wanandroidmvvm.base.view.BaseLifeCycleFragment
/**
* Time: 7/30/2021 14:13
* Author: Captain
* Description: 初见时你很迷人
*/
class OnlineDetailFragment :
BaseLifeCycleFragment<OnlineDetailFragmentViewModel, FragmentOnlineDetailBinding>(
FragmentOnlineDetailBinding::inflate
) {
override fun initDataObserver() {
}
override fun initView() {
super.initView()
}
override fun initData() {
super.initData()
binding.apply {
val dataImg: String = "<p>中新网1月21日电 为什么要对返乡人员加强疫情防控管理?返乡前核酸检测阴性证明如何获得?" +
"持核酸检测阴性证明返乡后是否需要隔离?20日,国家卫健委就《冬春季农村地区新冠肺炎疫情防控工作方案》重点问题答问。" +
"</p ><p>近日,国务院应对新型冠状病毒肺炎疫情联防联控机制综合组和中央农村工作领导小组办公室制定了《冬春季农村地区新" +
"冠肺炎疫情防控工作方案》。《方案》明确,返乡人员需持7天内有效新冠病毒核酸检测阴性结果返乡,返乡后实行14天居家健康监测" +
",期间不聚集、不流动,每7天开展一次核酸检测。</p ><p style=\"text-align: center;\"><img title=\"资" +
"料图:2020年2月18日,乘坐火车抵达南京火车站的乘客们有序出站。当日,为期四十天的2020年中国春运落幕。<a target='_bla" +
"nk' href=' '>中新社</ a>记者 泱波 摄\" alt=\"点击进入下一页\" src=\"http://image1.chinanews.com.cn" +
"/cnsupload/big/2020/02-18/4-426/18402a9652714f66895f38c0806224f3.jpg\"/></p ><p>资料图:2020年2" +
"月18日,乘坐火车抵达南京火车站的乘客们有序出站。当日,为期四十天的2020年中国春运落幕。中新社记者  泱波 摄</p ><p>一、" +
"为什么要对返乡人员加强疫情防控管理?</p ><p>进入冬季以来,农村地区零星散发病例和局部聚集性疫情明显增加,严重影响当地正常生产生" +
"活秩序。农村地区防控能力薄弱,疫情防控难度大,特别是春运期间返乡人员明显增多,人员流动增大,将会进一步加大疫情传播风险。为严格落实内" +
"防反弹的防控策略,对返乡人员加强疫情防控管理十分必要。核酸检测是目前尽早发现新冠病毒感染者的有效手段,要求返乡人员持核酸检测阴性证明" +
"能够有效降低疫情传入农村的风险,保障大家度过一个健康、平安的春节。</p ><p>二、工作方案所指返乡人员包括哪些人群?</p ><p>工作方案" +
"所指返乡人员是指从外地返回农村地区的人员,主要包括:一是跨省份返乡人员;二是来自本省内中高风险区域所在地市的返乡人员(中高风险区" +
"域内部人员原则上不流动);三是本省内的进口冷链食品从业人员、口岸直接接触进口货物从业人员、隔离场所工作人员、交通运输工具从业人员等重点人群。"
webView.loadDataWithBaseURL(null, dataImg, "text/html", "utf-8", null)
}
}
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.home.repository
import androidx.lifecycle.MutableLiveData
import com.br_technology.securitytrain_master.base.common.State
import com.wjx.android.wanandroidmvvm.base.repository.ApiRepository
/**
* Time: 7/30/2021 16:09
* Author: Captain
* Description: 初见时你很迷人
*/
class CourseListRepository(val loadState: MutableLiveData<State>) : ApiRepository() {
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.home.repository
import androidx.lifecycle.MutableLiveData
import com.br_technology.securitytrain_master.base.common.State
import com.wjx.android.wanandroidmvvm.base.repository.ApiRepository
/**
* Time: 7/30/2021 14:14
* Author: Captain
* Description: 初见时你很迷人
*/
class OnlineDetailFragmentRepository(val loadState: MutableLiveData<State>) : ApiRepository() {
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.home.repository
import androidx.lifecycle.MutableLiveData
import com.br_technology.securitytrain_master.base.common.State
import com.wjx.android.wanandroidmvvm.base.repository.ApiRepository
/**
* Time: 7/30/2021 13:58
* Author: Captain
* Description: 初见时你很迷人
*/
class OnlineDetailRepository (val loadState: MutableLiveData<State>): ApiRepository() {
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.home.viewmodel
import com.br_technology.securitytrain_master.ui.home.repository.CourseListRepository
import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel
/**
* Time: 7/30/2021 16:10
* Author: Captain
* Description: 初见时你很迷人
*/
class CourseListViewModel : BaseViewModel<CourseListRepository>() {
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.home.viewmodel
import com.br_technology.securitytrain_master.ui.home.repository.OnlineDetailFragmentRepository
import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel
/**
* Time: 7/30/2021 14:14
* Author: Captain
* Description: 初见时你很迷人
*/
class OnlineDetailFragmentViewModel : BaseViewModel<OnlineDetailFragmentRepository>() {
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.ui.home.viewmodel
import com.br_technology.securitytrain_master.ui.home.repository.OnlineDetailRepository
import com.wjx.android.wanandroidmvvm.base.viewmodel.BaseViewModel
/**
* Time: 7/30/2021 14:00
* Author: Captain
* Description: 初见时你很迷人
*/
class OnlineDetailViewModel : BaseViewModel<OnlineDetailRepository>() {
}
\ No newline at end of file
... ...
package com.br_technology.securitytrain_master.view
import android.app.Activity
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.Window
import android.widget.PopupWindow
import androidx.core.content.ContextCompat
... ...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/layout_tool_bar" />
<com.br_technology.securitytrain_master.view.ViewToolBar
android:id="@+id/tool_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:toolTitle="课程详情" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
android:id="@+id/video_player"
android:layout_width="match_parent"
android:layout_height="210dp" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
style="@style/SearchTab"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:overScrollMode="never"
app:tabMode="auto"
app:tabSelectedTextColor="@color/color_252"
app:tabTextColor="@color/color_96" />
<androidx.viewpager.widget.ViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_marginTop="24dp"
android:layout_gravity="center_horizontal"
android:background="@mipmap/course_list_bg"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<TextView
android:layout_marginStart="18dp"
android:layout_gravity="center_vertical"
android:drawablePadding="14dp"
android:drawableStart="@mipmap/course_list_video"
android:textColor="@color/color_32"
android:text= "自动化制造课程"
android:textSize="16sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
android:overScrollMode="never"
android:scrollbars="none"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" >
</androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:background="@mipmap/course_detail_bg"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="36dp"
android:layout_marginTop="12dp"
android:drawableStart="@mipmap/icon_course_detail_user"
android:drawablePadding="4dp"
android:gravity="center_vertical"
android:text="@string/peixunduixiang"
android:textColor="@color/color_10BE8A"
android:textSize="14sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="36dp"
android:layout_marginTop="8dp"
android:text="@string/shiyong"
android:textColor="@color/color_10BE8A"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="12dp"
android:textColor="@color/color_32"
android:textSize="17sp"
tools:text="话费的回复是单号发大师傅但是感觉还是风格的" />
<WebView
android:id="@+id/web_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="16dp" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
\ No newline at end of file
... ...
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="64dp"
android:orientation="horizontal">
<TextView
android:id="@+id/tv_num"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="16dp"
android:textColor="@color/color_c8"
android:textSize="14sp"
tools:text="1.1" />
<TextView
android:id="@+id/tv_title"
android:layout_marginStart="8dp"
android:layout_marginEnd="16dp"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textColor="@color/color_32"
android:textSize="14sp"
android:text="公式·用公式破解英文逻辑h很多发货速度放缓的是符合东方很过分的话" />
<TextView
android:id="@+id/tv_play"
android:padding="4dp"
android:background="@drawable/solid_25_4"
android:gravity="center_vertical"
android:drawablePadding="6dp"
android:drawableStart="@mipmap/course_list_play"
android:layout_marginEnd="16dp"
android:layout_width="wrap_content"
android:layout_height="28dp"
android:layout_gravity="center_vertical"
android:textColor="@color/white"
android:textSize="14sp"
tools:text="01:53:00" />
</LinearLayout>
</LinearLayout>
\ No newline at end of file
... ...
... ... @@ -23,5 +23,6 @@
<color name="color_f2f3">#F2F3F5</color>
<color name="color_33">#333333</color>
<color name="color_eff2">#EFF2F6</color>
<color name="color_10BE8A">#10BE8A</color>
</resources>
\ No newline at end of file
... ...
<resources>
<string name="app_name">SecurityTrain-Master</string>
<string name="logo">logo</string>
<string name="peixunduixiang">培训对象</string>
<string name="shiyong">适用于:三七人员、矿下人员等</string>
</resources>
\ No newline at end of file
... ...
... ... @@ -18,6 +18,7 @@ allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
... ...