1.完成详情页播放速度弹窗

2.对齐详情页信息展示剧以及选集弹窗显示
This commit is contained in:
raoqian 2025-09-22 18:28:57 +08:00
parent 512153242e
commit 848537d35b
52 changed files with 980 additions and 398 deletions

View File

@ -30,6 +30,8 @@ object Constants {
const val Constants_Episodes_Series_DataExample = "Constants_Episodes_Series_DataExample"
const val CONSTANTS_activity_id = "activity_id"
const val CONSTANTS_refresh_me = "CONSTANTS_refresh_me"
const val CONSTANTS_video_speed = "CONSTANTS_video_speed"
const val CONSTANTS_video_quality = "CONSTANTS_video_quality"
const val Constants_DDL_Url = "Constants_DDL_Url"
const val CONSTANTS_leaveApp = "CONSTANTS_leaveApp"
const val CONSTANTS_enterTheApp = "CONSTANTS_enterTheApp"

View File

@ -11,6 +11,7 @@ import com.jia.er.nebuluxe.app.R
import com.jia.er.nebuluxe.app.basics.BaseActivity
import com.jia.er.nebuluxe.app.basics.BaseFragment
import com.jia.er.nebuluxe.app.basics.Constants
import com.jia.er.nebuluxe.app.data.HistoryDataRes
import com.jia.er.nebuluxe.app.data.HomeBannerAndNineSquarepRes
import com.jia.er.nebuluxe.app.data.HomeBannerBean
import com.jia.er.nebuluxe.app.data.HomeModuleBean
@ -18,6 +19,7 @@ import com.jia.er.nebuluxe.app.data.HomeTopWeekRes
import com.jia.er.nebuluxe.app.databinding.FragmentHomeBinding
import com.jia.er.nebuluxe.app.net.MainViewModel
import com.jia.er.nebuluxe.app.ui.RotateDownPageTransformer
import com.jia.er.nebuluxe.app.utils.ImageLoadUtil
import com.jia.er.nebuluxe.app.utils.LOG
import com.jia.er.nebuluxe.app.utils.singleClick
import com.jia.er.nebuluxe.app.utils.toast
@ -40,6 +42,27 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
page = 1
mViewModel.allModules()
}
mViewModel.historysData_home.observe(this) {
if (it.data?.list?.get(0) != null) {
binding.llHistory.visibility = View.VISIBLE
binding.tvHisTitle.text = it.data.list[0].name
binding.tvHisEp.text =
String.format(getString(R.string.ep_), it.data.list[0].current_episode)
ImageLoadUtil.loadImage(
it.data.list[0].image_url, binding.ivHistory
)
binding.ivHisPlay.tag = it.data.list[0]
}
}
binding.ivHisClose.setOnClickListener {
binding.llHistory.visibility = View.GONE
}
binding.ivHisPlay.setOnClickListener {
binding.llHistory.visibility = View.GONE
openVideo((it.tag as HistoryDataRes.Data).short_play_id)
}
mViewModel.myHomeHistory()
binding.tvHot.setOnClickListener {
skip2Activity(HotActivity::class.java)
}
@ -97,9 +120,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
private fun setMarqueeData(item: HomeModuleBean.RecommandDataBean) {
binding.root.postDelayed({
dataList.clear()
val marqueeList =
gson.fromJson(item.data, Array<HomeBannerBean>::class.java)
.toList()
val marqueeList = gson.fromJson(item.data, Array<HomeBannerBean>::class.java).toList()
marqueeList?.forEach { it1 ->
dataList.add(it1.name)
}
@ -110,28 +131,16 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
}
private fun setNewRecommend(item: HomeModuleBean.RecommandDataBean) {
val cagetoryBean =
gson.fromJson(item.data, HomeTopWeekRes::class.java)
val cagetoryBean = gson.fromJson(item.data, HomeTopWeekRes::class.java)
if (cagetoryBean.list.isNotEmpty()) {
binding?.clBannerB?.visibility = View.VISIBLE
val exampleHomeBannerAdapter =
HomeBannerBottomAdapter(cagetoryBean.list)
val exampleHomeBannerAdapter = HomeBannerBottomAdapter(cagetoryBean.list)
binding?.bannerHomeB?.setBannerGalleryEffect(24, 10, 1f)
binding?.bannerHomeB?.setAdapter(
exampleHomeBannerAdapter
)?.addBannerLifecycleObserver(this)
?.setIndicator(binding.indicatorHome, false)
)?.addBannerLifecycleObserver(this)?.setIndicator(binding.indicatorHome, false)
exampleHomeBannerAdapter.setOnBannerListener { data, position ->
startActivity(
Intent(
context,
PlayerDetailActivity::class.java
).apply {
putExtra(
Constants.CONSTANTS_short_play_id,
data?.short_play_id
)
})
openVideo(data?.short_play_id)
}
} else {
binding?.clBannerB?.visibility = View.GONE
@ -139,31 +148,19 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
}
private fun setRecommendData(item: HomeModuleBean.RecommandDataBean) {
val homeBannerAndNineSquarepRes =
gson.fromJson(
item.data,
HomeBannerAndNineSquarepRes::class.java
val homeBannerAndNineSquarepRes = gson.fromJson(
item.data, HomeBannerAndNineSquarepRes::class.java
)
if (homeBannerAndNineSquarepRes?.list?.isNotEmpty() == true) {
binding?.clBanner?.visibility = View.VISIBLE
val exampleHomeBannerAdapter =
HomeBannerAdapter(homeBannerAndNineSquarepRes?.list)
val exampleHomeBannerAdapter = HomeBannerAdapter(homeBannerAndNineSquarepRes?.list)
binding?.bannerHome?.apply {
setAdapter(exampleHomeBannerAdapter)
setBannerGalleryEffect(65, 10, 1f)
setPageTransformer(RotateDownPageTransformer(10.5f))
}
exampleHomeBannerAdapter.setOnBannerListener { data, position ->
startActivity(
Intent(
context,
PlayerDetailActivity::class.java
).apply {
putExtra(
Constants.CONSTANTS_short_play_id,
data?.short_play_id
)
})
openVideo(data?.short_play_id)
}
} else {
binding?.clBanner?.visibility = View.GONE
@ -171,17 +168,12 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
}
private fun setBannerData(item: HomeModuleBean.RecommandDataBean) {
val bannerList =
gson.fromJson(item.data, Array<HomeBannerBean>::class.java)
.toList()
val bannerList = gson.fromJson(item.data, Array<HomeBannerBean>::class.java).toList()
if (bannerList?.isNotEmpty() == true) {
binding?.clFs?.visibility = View.VISIBLE
val exampleDominantCeoAdapter = HomeMostAdapter()
val layoutManager =
LinearLayoutManager(
context,
LinearLayoutManager.HORIZONTAL,
false
val layoutManager = LinearLayoutManager(
context, LinearLayoutManager.HORIZONTAL, false
)
binding?.rvFs?.layoutManager = layoutManager
binding?.rvFs?.adapter = exampleDominantCeoAdapter
@ -189,8 +181,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
exampleDominantCeoAdapter.submitList(bannerList)
val video = bannerList[0]
Glide.with(requireContext()).load(video?.horizontally_img)
.placeholder(R.drawable.iv_placeholder_h)
.into(binding.ivFs)
.placeholder(R.drawable.iv_placeholder_h).into(binding.ivFs)
binding.tvName.text = video.name
if (video.category.isNotEmpty()) {
binding.tvTag.visibility = View.VISIBLE
@ -199,24 +190,13 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
binding.tvTag.visibility = View.INVISIBLE
}
binding.ivFs.setOnClickListener {
startActivity(
Intent(
context,
PlayerDetailActivity::class.java
).apply {
putExtra(
Constants.CONSTANTS_short_play_id,
video.short_play_id
)
})
openVideo(video.short_play_id)
}
exampleDominantCeoAdapter.setOnItemClickListener { adapter, view, position ->
exampleDominantCeoAdapter.currentPosition = position
val video =
adapter.getItem(position) as HomeBannerBean
val video = adapter.getItem(position) as HomeBannerBean
Glide.with(requireContext()).load(video?.horizontally_img)
.placeholder(R.drawable.iv_placeholder_h)
.into(binding.ivFs)
.placeholder(R.drawable.iv_placeholder_h).into(binding.ivFs)
binding.tvName.text = video.name
if (video.category.isNotEmpty()) {
binding.tvTag.visibility = View.VISIBLE
@ -225,16 +205,7 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
binding.tvTag.visibility = View.INVISIBLE
}
binding.ivFs.setOnClickListener {
startActivity(
Intent(
context,
PlayerDetailActivity::class.java
).apply {
putExtra(
Constants.CONSTANTS_short_play_id,
video.short_play_id
)
})
openVideo(video.short_play_id)
}
exampleDominantCeoAdapter.notifyDataSetChanged()
}
@ -244,6 +215,21 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
}
}
fun openVideo(videoId: Int?) {
if (videoId == null) {
LOG.d("HomeFragment", "openVideo.videoId.is.empty:" + LOG.useInfo())
return
}
startActivity(
Intent(
context, PlayerDetailActivity::class.java
).apply {
putExtra(
Constants.CONSTANTS_short_play_id, videoId
)
})
}
override fun getViewBinding(): FragmentHomeBinding {
return FragmentHomeBinding.inflate(layoutInflater)
}

View File

@ -33,8 +33,4 @@ class InputResultAdapter : BaseQuickAdapter<VideoListData, QuickViewHolder>() {
): QuickViewHolder {
return QuickViewHolder(R.layout.item_search_result, viewGroup)
}
fun setKeyword(input: String?) {
keyword = input
}
}

View File

@ -129,7 +129,7 @@ class SearchActivity : BaseActivity<ActivitySearchBinding>() {
private fun onSearch(input: String) {
Memory.saveSearchString(input)
mViewModel.searchDataByInput(input)
searchResultAdapter!!.setKeyword(input)
searchResultAdapter!!.keyword = input
KeyboardUtils.hideSoftInput(this)
}

View File

@ -1,6 +1,7 @@
package com.jia.er.nebuluxe.app.main
import android.view.KeyEvent
import android.view.View
import androidx.fragment.app.FragmentTransaction
import androidx.lifecycle.ViewModelProvider
import com.jia.er.nebuluxe.app.home.HomeFragment
@ -15,6 +16,8 @@ import com.jia.er.nebuluxe.app.data.TabEntity
import com.jia.er.nebuluxe.app.databinding.ActivityMainBinding
import com.jia.er.nebuluxe.app.me.MeFragment
import com.jia.er.nebuluxe.app.net.MainViewModel
import com.jia.er.nebuluxe.app.utils.ImageLoadUtil
import com.jia.er.nebuluxe.app.utils.LOG
import com.jia.er.nebuluxe.app.utils.Memory
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
@ -25,25 +28,16 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
private val mViewModel by lazy { ViewModelProvider(this)[MainViewModel::class.java] }
private var titles = arrayOf(
"",
"",
"",
""
"", "", "", ""
)
private val iconUnSelectIds by lazy {
intArrayOf(
R.drawable.iv_home_n,
R.drawable.iv_reels_n,
R.drawable.iv_saved_n,
R.drawable.iv_me_n
R.drawable.iv_home_n, R.drawable.iv_reels_n, R.drawable.iv_saved_n, R.drawable.iv_me_n
)
}
private val iconSelectIds by lazy {
intArrayOf(
R.drawable.iv_home_h,
R.drawable.iv_reels_h,
R.drawable.iv_saved_h,
R.drawable.iv_me_h
R.drawable.iv_home_h, R.drawable.iv_reels_h, R.drawable.iv_saved_h, R.drawable.iv_me_h
)
}
private val tabEntities = ArrayList<CustomTabEntity>()
@ -87,6 +81,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
)
}
binding.tabLayout.setTabData(tabEntities)
binding?.tabLayout?.setOnTabSelectListener(object : OnTabSelectListener {
override fun onTabSelect(position: Int) {
switchFragment(position)
@ -178,8 +174,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
}
mViewModel.userRegisterData.observe(this) {
if (it != null) {
Memory.getMMKV()
.putString(Constants.CONSTANTS_AuthorizationExample, it.data?.token)
Memory.getMMKV().putString(Constants.CONSTANTS_AuthorizationExample, it.data?.token)
EventBus.getDefault().post(Constants.CONSTANTS_refresh_me)
}
}
@ -220,6 +215,16 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
// }
// }
override fun onResume() {
super.onResume()
when (index) {
0 -> homeFragment?.onResume()
1 -> reelsFragment?.onResume()
2 -> myListFragment?.onResume()
3 -> meFragment?.onResume()
}
}
// private fun showHistoryDialog(data: MainDataHis) {
// binding?.dialogHistory?.ivCloseHistory?.setOnClickListener {
// Memory.getMMKV()

View File

@ -126,6 +126,11 @@ object MainRequest {
appService.myHistorys(current_page).response()
}
fun myHomeHistorys(
current_page: Int
): LiveData<Result<BaseRes<HistoryDataRes>>> = handleData {
appService.myHistorys(current_page, 1).response()
}
fun getVideoList(search: String): LiveData<Result<BaseRes<VideoListDataRes>>> =
handleData {

View File

@ -184,6 +184,14 @@ class MainViewModel : ViewModel() {
}
}
private val historysLiveData_home = MutableLiveData<BaseRes<HistoryDataRes>>()
val historysData_home: MutableLiveData<BaseRes<HistoryDataRes>> get() = historysLiveData_home
fun myHomeHistory() {
MainRequest.myHomeHistorys(1).observeForever { result ->
historysLiveData_home.value = result.getOrNull()
}
}
private val getDetailsRecommandLiveData = MutableLiveData<BaseRes<DetailsRecommendRes>>()
val getDetailsRecommandData: MutableLiveData<BaseRes<DetailsRecommendRes>> get() = getDetailsRecommandLiveData
@ -400,7 +408,7 @@ class MainViewModel : ViewModel() {
private val userCenterRecommendLiveData = MutableLiveData<BaseRes<ShortListCategoryDataInfo>?>()
val userCenterRecommendData: MutableLiveData<BaseRes<ShortListCategoryDataInfo>?> get() = userCenterRecommendLiveData
fun userCenterRecommend(){
fun userCenterRecommend() {
MainRequest.userCenterRecommend()
.observeForever {
userCenterRecommendLiveData.value = it.getOrNull()

View File

@ -53,7 +53,7 @@ class LoadingLine : FrameLayout {
loadView!!.startAnimation(set)
}
fun endAnimation(){
fun endAnimation() {
loadView!!.clearAnimation()
}
}

View File

@ -0,0 +1,18 @@
package com.jia.er.nebuluxe.app.utils
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.jia.er.nebuluxe.app.R
object ImageLoadUtil {
fun loadImage(url: String?, iv: ImageView?) {
if (url == null || iv == null) {
LOG.d("ImageLoadUtil.9", "图片填充错误:" + LOG.useInfo())
return
}
val isHor = iv.width > iv.height
Glide.with(iv.context).load(url)
.placeholder(if (isHor) R.drawable.ic_default_iv_hor else R.drawable.ic_default_iv_ver)
.into(iv)
}
}

View File

@ -99,6 +99,11 @@ public class LOG {
return newString;
}
public static String useInfo() {//该方法 所在方法的 调用所在行数
return getWhere(2);
}
public static int useLine() {//该方法 所在方法的 调用所在行数
StackTraceElement[] stacks = new Exception().getStackTrace();
return stacks[2].getLineNumber();

View File

@ -20,7 +20,9 @@ import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.jia.er.nebuluxe.app.R
import com.jia.er.nebuluxe.app.data.DetailsRecommendRes
import com.jia.er.nebuluxe.app.utils.LOG
import com.youth.banner.adapter.BannerAdapter
import com.youth.banner.listener.OnBannerListener
@SuppressLint("UnsafeOptInUsageError")
@ -79,6 +81,9 @@ class NewRecommendBannerAdapter(items: List<DetailsRecommendRes.Item?>?, context
playerMap[position] = exoPlayer
}
playerView?.player = exoPlayer
playerView?.setOnClickListener {
mListener?.OnBannerClick(data, position)
}
exoPlayer.let { player ->
player.addListener(object : Player.Listener {
@ -113,6 +118,13 @@ class NewRecommendBannerAdapter(items: List<DetailsRecommendRes.Item?>?, context
}
}
var mListener: OnBannerListener<DetailsRecommendRes.Item?>? = null
override fun setOnBannerListener(listener: OnBannerListener<DetailsRecommendRes.Item?>?) {
super.setOnBannerListener(listener)
mListener = listener
}
private fun getLoadControl(): LoadControl {
return androidx.media3.exoplayer.DefaultLoadControl.Builder()
.setBufferDurationsMs(

View File

@ -19,6 +19,7 @@ import androidx.lifecycle.lifecycleScope
import androidx.media3.common.MediaItem
import androidx.media3.common.PlaybackException
import androidx.media3.common.Player
import androidx.media3.common.Timeline
import androidx.media3.datasource.DataSource
import androidx.media3.datasource.DefaultDataSourceFactory
import androidx.media3.exoplayer.DefaultRenderersFactory
@ -46,6 +47,7 @@ import com.jia.er.nebuluxe.app.ui.LoadingLine
import com.jia.er.nebuluxe.app.ui.OnSnapHelperCurrentListener
import com.jia.er.nebuluxe.app.ui.RecyclerViewScrollerDetection
import com.jia.er.nebuluxe.app.utils.DialogUtils
import com.jia.er.nebuluxe.app.utils.LOG
import com.jia.er.nebuluxe.app.utils.Memory
import com.jia.er.nebuluxe.app.utils.appendWithStyle
import com.jia.er.nebuluxe.app.utils.formatTimestamp
@ -63,8 +65,8 @@ import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
@SuppressLint("UnsafeOptInUsageError")
class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
OnSnapHelperCurrentListener, SeriesDialogFragment.SeriesCallBack {
class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(), OnSnapHelperCurrentListener,
SeriesDialogFragment.SeriesCallBack {
private var builder: ExoPlayer.Builder? = null
private var player: ExoPlayer? = null
private val pagerSnapHelper = PagerSnapHelper()
@ -74,18 +76,23 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
private var currentView: View? = null
private var loadingLine: LoadingLine? = null
private var tvName: AppCompatTextView? = null
private var tvTime: AppCompatTextView? = null
private var tvTimeStart: AppCompatTextView? = null
private var tvTimeEnd: AppCompatTextView? = null
private var tvEpTotal: AppCompatTextView? = null
private var tvEpCurrent: AppCompatTextView? = null
private var tvCollectionNum: AppCompatTextView? = null
private var play: AppCompatImageView? = null
private var collection: AppCompatImageView? = null
private var ivIconPlayer: AppCompatImageView? = null
private var ivCover: AppCompatImageView? = null
private var ivBackController: AppCompatImageView? = null
private var icBtnMore: View? = null
private var exampleSeekbarPlayerController: AppCompatSeekBar? = null
private var exampleProgressJob: Job? = null
private var isDragging = false
private var isPlaying = false
private var videoSpeed = 1.toFloat()
private var videoQuality = 540.toFloat()
private var shortVideoId: Int = 0
private var dataRes: PlayerDetailDataRes.Episode? = null
private var currentPosition = 0
@ -100,7 +107,8 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
private var needRefresh: Boolean = false
private var payPosition = 0
private var isCanPlay = false
// private var isLock = false
// private var isLock = false
private var exampleSeriesDialogFragment: SeriesDialogFragment? = null
@SuppressLint("UnsafeOptInUsageError")
@ -111,8 +119,7 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
startTime = System.currentTimeMillis()
shortVideoId = intent.getIntExtra(Constants.CONSTANTS_short_play_id, 0)
activityId = intent.getIntExtra(Constants.CONSTANTS_activity_id, 0)
builder = ExoPlayer.Builder(this, FfmpegRenderersFactory(this))
.setRenderersFactory(
builder = ExoPlayer.Builder(this, FfmpegRenderersFactory(this)).setRenderersFactory(
DefaultRenderersFactory(this).setEnableDecoderFallback(
true
)
@ -122,13 +129,28 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
playerView?.player = player
loadingLine = playerView?.findViewById(R.id.load_line)
tvName = playerView?.findViewById(R.id.example_tv_title_player_controller)
tvTime = playerView?.findViewById(R.id.tv_player_seek_time)
tvTimeStart = playerView?.findViewById(R.id.tv_player_seek_time_current)
tvTimeEnd = playerView?.findViewById(R.id.tv_player_seek_time_all)
tvEpCurrent = playerView?.findViewById(R.id.tv_ep_current)
tvEpTotal = playerView?.findViewById(R.id.tv_ep_total)
tvCollectionNum = playerView?.findViewById(R.id.example_tv_collection_num_controller)
collection = playerView?.findViewById(R.id.example_iv_collection_controller)
play = playerView?.findViewById(R.id.example_iv_play_player_controller)
ivIconPlayer = playerView?.findViewById(R.id.iv_icon_player)
ivBackController = playerView?.findViewById(R.id.iv_back_controller)
icBtnMore = playerView?.findViewById(R.id.iv_btn_more)
icBtnMore?.setOnClickListener {
singleClick {
val exampleSeriesDialogFragment = SpeedDialogFragment()
val bundle = Bundle()
bundle.putFloat(Constants.CONSTANTS_video_speed, videoSpeed)
bundle.putFloat(Constants.CONSTANTS_video_quality, videoQuality)
exampleSeriesDialogFragment.arguments = bundle
exampleSeriesDialogFragment.show(
supportFragmentManager, "SpeedDialogFragment"
)
}
}
exampleSeekbarPlayerController =
playerView?.findViewById(R.id.example_seekBar_player_controller)
play?.setOnClickListener {
@ -146,6 +168,22 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
}
}
player?.addListener(object : Player.Listener {
override fun onSeekBackIncrementChanged(seekBackIncrementMs: Long) {
super.onSeekBackIncrementChanged(seekBackIncrementMs)
LOG.d(
"PlayerDetailActivity", "onSeekBackIncrementChanged.155:" + seekBackIncrementMs
)
}
override fun onSeekForwardIncrementChanged(seekForwardIncrementMs: Long) {
super.onSeekForwardIncrementChanged(seekForwardIncrementMs)
LOG.d(
"PlayerDetailActivity",
"onSeekForwardIncrementChanged.160:" + seekForwardIncrementMs
)
}
override fun onPlaybackStateChanged(playbackState: Int) {
super.onPlaybackStateChanged(playbackState)
when (playbackState) {
@ -198,38 +236,30 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
doCollect()
}
}
tvEpTotal?.setOnClickListener {
playerView?.findViewById<View>(R.id.cl)?.setOnClickListener {
singleClick {
exampleSeriesDialogFragment = SeriesDialogFragment()
val bundle = Bundle()
dataRes?.episode?.let { it1 ->
bundle.putInt(
Constants.Constants_Episodes_Series_Data_currentPositionExample,
it1
Constants.Constants_Episodes_Series_Data_currentPositionExample, it1
)
}
bundle.putParcelable(
Constants.Constants_Episodes_Series_DataExample,
dataRes?.shortPlayInfo
Constants.Constants_Episodes_Series_DataExample, dataRes?.shortPlayInfo
)
bundle.putParcelableArrayList(
Constants.Constants_Episodes_Series_Data_ListExample,
playerDetailAdapter?.items?.let { it1 -> ArrayList(it1) }
)
playerDetailAdapter?.items?.let { it1 -> ArrayList(it1) })
exampleSeriesDialogFragment?.seriesCallBack = this
exampleSeriesDialogFragment?.arguments = bundle
exampleSeriesDialogFragment?.show(
supportFragmentManager,
"SeriesDialogFragment"
supportFragmentManager, "SeriesDialogFragment"
)
}
}
mViewModel.getVideoDetails(
shortVideoId,
0,
activityId,
revolution,
null
shortVideoId, 0, activityId, revolution, null
)
onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
@ -279,10 +309,7 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
dataRes?.short_play_id?.let { it1 ->
dataRes?.short_play_video_id?.let { it2 ->
DialogUtils.unFavoriteDialog(
this,
it1,
it2,
mViewModel
this, it1, it2, mViewModel
)
}
}
@ -364,35 +391,32 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
if (it.data?.list?.isNotEmpty() == true) {
binding.viewVideoRecommend.root.visibility = View.VISIBLE
binding.viewVideoRecommend.bottom.setOnClickListener { }
recommendBannerAdapter =
NewRecommendBannerAdapter(it.data.list, this)
recommendBannerAdapter = NewRecommendBannerAdapter(it.data.list, this)
binding?.viewVideoRecommend?.exampleBannerRecommend?.setBannerGalleryEffect(
52,
12
52, 12
)
binding?.viewVideoRecommend?.exampleBannerRecommend?.setAdapter(
binding?.viewVideoRecommend?.exampleBannerRecommend?.adapter =
recommendBannerAdapter
)
val i = it.data.list.size / 2
binding?.viewVideoRecommend?.exampleBannerRecommend?.setCurrentItem(
i,
false
i, false
)
recommendBannerAdapter?.setOnBannerListener { data, position ->
watchNow(data)
}
recommendBannerAdapter?.currentPlayingPosition = i
recommendBannerPosition = i
recommendBannerAdapter?.resumeCurrentPlayer()
binding?.viewVideoRecommend?.exampleBannerRecommend?.addOnPageChangeListener(
object :
OnPageChangeListener {
object : OnPageChangeListener {
override fun onPageScrolled(
position: Int,
positionOffset: Float,
positionOffsetPixels: Int
position: Int, positionOffset: Float, positionOffsetPixels: Int
) {
}
@SuppressLint("UnsafeOptInUsageError")
override fun onPageSelected(position: Int) {
LOG.d("PlayerDetailActivity", "onPageSelected.399:" + position)
recommendBannerPosition = position
recommendBannerAdapter?.pauseAllPlayers()
recommendBannerAdapter?.currentPlayingPosition = position
@ -412,15 +436,13 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
}
}
mViewModel.infoData.observe(this) {
if (it != null) {
it.data?.let { it1 ->
it?.data?.let { it1 ->
Memory.saveUserInfo(it1)
if (needRefresh) {
detailRefresh()
}
}
}
}
// mViewModel.buy_videoData.observe(this) {
// if (it != null) {
// when (it.data?.status) {
@ -459,8 +481,7 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
mViewModel.videoDetailsData.observe(this) { it ->
if (it != null) {
playerDetailAdapter = PlayerDetailAdapter()
val layoutManager =
LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)
val layoutManager = LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false)
binding?.rvDetail?.layoutManager = layoutManager
binding?.rvDetail?.adapter = playerDetailAdapter
binding?.rvDetail?.isNestedScrollingEnabled = false
@ -476,8 +497,7 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
it1.shortPlayInfo = it.data.shortPlayInfo
}
ivIconPlayer?.let { it1 ->
Glide.with(this).load(it.data?.shortPlayInfo?.image_url)
.into(it1)
Glide.with(this).load(it.data?.shortPlayInfo?.image_url).into(it1)
}
playerDetailAdapter?.submitList(it.data?.episodeList)
if (needRefresh) {
@ -487,8 +507,7 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
} else {
if (it.data?.video_info != null) {
if (it.data.video_info.episode > 1) {
it.data.video_info.episode.minus(1)
.let { it1 ->
it.data.video_info.episode.minus(1).let { it1 ->
recyclerViewScrollerDetection.isFirstAttached = false
binding.rvDetail.scrollToPosition(it1)
}
@ -533,8 +552,7 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
@SuppressLint("UnsafeOptInUsageError")
private fun buildMediaSource(videoPath: String): MediaSource {
val dataSourceFactory: DataSource.Factory =
DefaultDataSourceFactory(this, "reelcrush")
val dataSourceFactory: DataSource.Factory = DefaultDataSourceFactory(this, "reelcrush")
return if (videoPath.endsWith(".m3u8")) {
HlsMediaSource.Factory(dataSourceFactory)
@ -584,16 +602,15 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
if (fromUser) {
seekTo(progress)
}
seekTime()
}
override fun onStartTrackingTouch(seekBar: SeekBar?) {
tvTime?.visibility = FrameLayout.VISIBLE
isDragging = true
}
override fun onStopTrackingTouch(seekBar: SeekBar?) {
isDragging = false
tvTime?.visibility = FrameLayout.INVISIBLE
}
})
}
@ -614,15 +631,13 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
private fun seekTo(progress: Int) {
player?.seekTo(progress.toLong())
seekTime()
}
private fun seekTime() {
val currentPosition = player!!.currentPosition
val currentTime = formatTimestamp(currentPosition / 1000)
tvTimeStart?.text = formatTimestamp(currentPosition / 1000)
val totalDuration = player!!.duration
val totalTime = formatTimestamp(totalDuration / 1000)
tvTime?.text = "$currentTime/$totalTime"
tvTimeEnd?.text = formatTimestamp(totalDuration / 1000)
}
override fun getViewBinding(): ActivityPlayDetailBinding {
@ -645,10 +660,7 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
@SuppressLint("UnsafeOptInUsageError")
override fun setActive(
currentView: View?,
position: Int,
previousView: View?,
previousPosition: Int
currentView: View?, position: Int, previousView: View?, previousPosition: Int
) {
seek = true
isCanPlay = true
@ -690,21 +702,19 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
tvCollectionNum?.text = dataRes?.shortPlayInfo?.collect_total.toString()
val builder = SpannableStringBuilder()
builder.appendWithStyle(
"Ep.".plus(dataRes?.episode),
Color.parseColor("#FFDAA4"),
isBold = true
)
.appendWithStyle(
"Ep.".plus(dataRes?.episode), Color.parseColor("#FFDAA4"), isBold = true
).appendWithStyle(
"/Ep.".plus(dataRes?.shortPlayInfo?.episode_total),
Color.parseColor("#FFFFFF"),
isBold = false
)
tvEpTotal?.text = builder
tvEpTotal?.text =
String.format(getString(R.string.ep_all_), dataRes?.shortPlayInfo?.episode_total)
tvEpCurrent?.text = String.format(getString(R.string.ep_), dataRes?.episode)
if (dataRes?.is_lock == false || Memory.isVip()) {
dataRes?.short_play_video_id?.let {
mViewModel.doCreateHistory(
shortVideoId,
it
shortVideoId, it
)
}
}
@ -726,8 +736,7 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
private fun uploadSeconds() {
if (dataRes?.is_lock == false) {
playerDetailAdapter?.getItem(currentPosition)?.play_seconds =
if (needRestart) "0" else lastProgress()
.toString()
if (needRestart) "0" else lastProgress().toString()
mViewModel.uploadHistorySeconds(
UploadHistoryReq(
if (needRestart) 0 else lastProgress(),
@ -743,8 +752,7 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
// isLock = episode.is_lock
uploadSeconds()
val index = playerDetailAdapter?.items?.withIndex()?.firstOrNull {
(episode.episode == it.value.episode) && (episode.shortPlayInfo?.name == it.value.shortPlayInfo?.name
)
(episode.episode == it.value.episode) && (episode.shortPlayInfo?.name == it.value.shortPlayInfo?.name)
}?.index
recyclerViewScrollerDetection.isFirstAttached = false
index?.let { binding.rvDetail.scrollToPosition(it) }
@ -759,9 +767,7 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
if (dataRes?.is_lock == false || Memory.isVip()) {
dataRes?.short_play_id?.let {
UploadHistoryReq(
lastProgress(),
it,
dataRes?.short_play_video_id
lastProgress(), it, dataRes?.short_play_video_id
)
}?.let {
mViewModel.uploadHistorySeconds(
@ -778,12 +784,9 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
dataRes?.episode.toString(),
dataRes?.shortPlayInfo?.image_url.toString()
)
}
)
Memory.getMMKV()
.putString(Constants.Constants_Main_Video_info, toJson)
Memory.getMMKV()
.putBoolean(Constants.Constants_Main_Video_status, true)
})
Memory.getMMKV().putString(Constants.Constants_Main_Video_info, toJson)
Memory.getMMKV().putBoolean(Constants.Constants_Main_Video_status, true)
}
}
@ -796,11 +799,7 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
player?.pause()
player?.stop()
mViewModel.getVideoDetails(
shortVideoId,
0,
activityId,
revolution,
null
shortVideoId, 0, activityId, revolution, null
)
}
@ -813,6 +812,15 @@ class PlayerDetailActivity : BaseActivity<ActivityPlayDetailBinding>(),
}
}
@Subscribe(threadMode = ThreadMode.MAIN)
fun onEvent(event: VideoSettingEvent) {
player?.setPlaybackSpeed(event.playSpeed)
videoSpeed = event.playSpeed
// payPosition = dataRes?.episode?.minus(1)!!
// needRefresh = true
// mViewModel.getInfo()
}
override fun onReturn() {
super.onReturn()
finish()

View File

@ -7,6 +7,8 @@ import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.jia.er.nebuluxe.app.R
import com.jia.er.nebuluxe.app.data.PlayerDetailDataRes
import com.jia.er.nebuluxe.app.utils.ImageLoadUtil
import com.jia.er.nebuluxe.app.utils.ImageLoadUtil.loadImage
class PlayerDetailAdapter :
BaseQuickAdapter<PlayerDetailDataRes.Episode, QuickViewHolder>() {
@ -15,8 +17,7 @@ class PlayerDetailAdapter :
position: Int,
item: PlayerDetailDataRes.Episode?
) {
Glide.with(context).load(item?.shortPlayInfo?.image_url).placeholder(R.drawable.iv_placeholder_v)
.into(holder.getView(R.id.iv_icon))
loadImage(item?.shortPlayInfo?.image_url, holder.getView(R.id.iv_icon))
}
override fun onCreateViewHolder(

View File

@ -7,6 +7,7 @@ import com.chad.library.adapter4.BaseQuickAdapter
import com.chad.library.adapter4.viewholder.QuickViewHolder
import com.jia.er.nebuluxe.app.R
import com.jia.er.nebuluxe.app.data.PlayerDetailDataRes
import com.jia.er.nebuluxe.app.utils.Memory
class SeriesDataAdapter :
BaseQuickAdapter<PlayerDetailDataRes.Episode, QuickViewHolder>() {
@ -18,24 +19,27 @@ class SeriesDataAdapter :
) {
val view = holder.getView<AppCompatTextView>(R.id.example_tv_num_data)
view.text = item?.episode.toString()
if (currentPosition == view.text.toString().toInt()) {
holder.setBackgroundResource(R.id.example_tv_num_data, R.drawable.bg_example_num_h)
holder.setTextColor(
R.id.example_tv_num_data,
context.getColor(R.color.black)
)
} else {
holder.setBackgroundResource(R.id.example_tv_num_data, R.drawable.bg_example_num_n)
holder.setTextColor(
R.id.example_tv_num_data,
context.getColor(R.color.white)
)
}
// if (item?.is_lock == true && !Memory.isVip()) {
// holder.setVisible(R.id.iv_example_lock, true)
val select: Boolean = currentPosition == view.text.toString().toInt()
holder.setSelected(R.id.item_pan, select)
holder.setVisible(R.id.iv_example_playing, select)
// if (currentPosition == view.text.toString().toInt()) {
// holder.setBackgroundResource(R.id.example_tv_num_data, R.drawable.bg_example_num_h)
// holder.setTextColor(
// R.id.example_tv_num_data,
// context.getColor(R.color.black)
// )
// } else {
// holder.setVisible(R.id.iv_example_lock, false)
// holder.setBackgroundResource(R.id.example_tv_num_data, R.drawable.bg_example_num_n)
// holder.setTextColor(
// R.id.example_tv_num_data,
// context.getColor(R.color.white)
// )
// }
if (item?.is_lock == true && !Memory.isVip()) {
holder.setVisible(R.id.iv_example_lock, true)
} else {
holder.setVisible(R.id.iv_example_lock, false)
}
}
override fun onCreateViewHolder(

View File

@ -9,12 +9,12 @@ import android.view.WindowManager
import androidx.fragment.app.DialogFragment
import androidx.recyclerview.widget.GridLayoutManager
import com.jia.er.nebuluxe.app.R
import com.jia.er.nebuluxe.app.basics.Constants
import com.jia.er.nebuluxe.app.basics.Constants.Constants_Episodes_Series_DataExample
import com.jia.er.nebuluxe.app.basics.Constants.Constants_Episodes_Series_Data_ListExample
import com.jia.er.nebuluxe.app.basics.Constants.Constants_Episodes_Series_Data_currentPositionExample
import com.jia.er.nebuluxe.app.data.PlayerDetailDataRes
import com.jia.er.nebuluxe.app.databinding.DialogSeriesBinding
import com.jia.er.nebuluxe.app.utils.ImageLoadUtil.loadImage
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
@ -22,7 +22,7 @@ import org.greenrobot.eventbus.ThreadMode
class SeriesDialogFragment : DialogFragment() {
var seriesCallBack: SeriesCallBack? = null
var is_collect = false
var exampleDialogSeriesBinding: DialogSeriesBinding? = null
var binding: DialogSeriesBinding? = null
interface SeriesCallBack {
fun chooseSeries(episode: PlayerDetailDataRes.Episode)
@ -34,7 +34,7 @@ class SeriesDialogFragment : DialogFragment() {
val builder = AlertDialog.Builder(requireActivity())
val inflater = requireActivity().layoutInflater
val view = inflater.inflate(R.layout.dialog_series, null)
exampleDialogSeriesBinding = DialogSeriesBinding.bind(view)
binding = DialogSeriesBinding.bind(view)
val episodeList: List<PlayerDetailDataRes.Episode>? =
arguments?.getParcelableArrayList(Constants_Episodes_Series_Data_ListExample)
val data: PlayerDetailDataRes.ShortPlayInfo? =
@ -42,26 +42,26 @@ class SeriesDialogFragment : DialogFragment() {
val currentPosition =
arguments?.getInt(Constants_Episodes_Series_Data_currentPositionExample, 0)
val exampleSeriesDataAdapter = SeriesDataAdapter()
val spanCount = 6
val spanCount = 5
val layoutManager = GridLayoutManager(context, spanCount)
exampleDialogSeriesBinding?.rvDataDialogSeries?.layoutManager = layoutManager
exampleDialogSeriesBinding?.rvDataDialogSeries?.adapter = exampleSeriesDataAdapter
binding?.rvDataDialogSeries?.layoutManager = layoutManager
binding?.rvDataDialogSeries?.adapter = exampleSeriesDataAdapter
exampleSeriesDataAdapter.submitList(episodeList)
if (currentPosition != null) {
exampleSeriesDataAdapter.currentPosition = currentPosition
}
exampleDialogSeriesBinding?.tvDesDialogSeries?.text = data?.description
binding?.tvDesDialogSeries?.text = data?.description
if (data?.category?.isNotEmpty() == true) {
exampleDialogSeriesBinding?.tvTag?.visibility = View.VISIBLE
exampleDialogSeriesBinding?.tvTag?.text = data?.category?.get(0)
binding?.tvTag?.visibility = View.VISIBLE
binding?.tvTag?.text = data?.category?.get(0)
} else {
exampleDialogSeriesBinding?.tvTag?.visibility = View.GONE
binding?.tvTag?.visibility = View.GONE
}
is_collect = data?.is_collect == true
exampleDialogSeriesBinding?.ivCollect?.setImageResource(if (data?.is_collect == true) R.drawable.iv_example_collection_h else R.drawable.iv_example_collection_n)
exampleDialogSeriesBinding?.ivCollect?.setOnClickListener {
seriesCallBack?.collection()
}
// exampleDialogSeriesBinding?.ivCollect?.setImageResource(if (data?.is_collect == true) R.drawable.iv_example_collection_h else R.drawable.iv_example_collection_n)
// exampleDialogSeriesBinding?.ivCollect?.setOnClickListener {
// seriesCallBack?.collection()
// }
exampleSeriesDataAdapter.setOnItemClickListener { adapter, view, position ->
val item = adapter.getItem(position) as PlayerDetailDataRes.Episode
// if (position > 0) {
@ -76,8 +76,11 @@ class SeriesDialogFragment : DialogFragment() {
dismiss()
}
isCancelable = true
exampleDialogSeriesBinding?.tvContentDialogSeries?.text = data?.name
builder.setView(exampleDialogSeriesBinding?.root)
binding?.tvContentDialogSeries?.text = data?.name
loadImage(data?.image_url, binding?.iv)
binding?.tvEp?.text =
String.format(getString(R.string.tip_episodes_in_index_dialog), data?.episode_total)
builder.setView(binding?.root)
val dialog = builder.create()
dialog.window?.setBackgroundDrawableResource(android.R.color.transparent)
val window = dialog.window
@ -97,9 +100,9 @@ class SeriesDialogFragment : DialogFragment() {
@Subscribe(threadMode = ThreadMode.MAIN)
fun onEvent(event: String) {
if (Constants.CONSTANTS_collect_refresh == event) {
is_collect = !is_collect
exampleDialogSeriesBinding?.ivCollect?.setImageResource(if (is_collect == true) R.drawable.iv_example_collection_h else R.drawable.iv_example_collection_n)
}
// if (Constants.CONSTANTS_collect_refresh == event) {
// is_collect = !is_collect
// exampleDialogSeriesBinding?.ivCollect?.setImageResource(if (is_collect == true) R.drawable.iv_example_collection_h else R.drawable.iv_example_collection_n)
// }
}
}

View File

@ -0,0 +1,88 @@
package com.jia.er.nebuluxe.app.video
import android.app.AlertDialog
import android.app.Dialog
import android.os.Bundle
import android.view.Gravity
import android.view.View
import android.view.WindowManager
import androidx.fragment.app.DialogFragment
import com.jia.er.nebuluxe.app.basics.Constants.CONSTANTS_video_quality
import com.jia.er.nebuluxe.app.basics.Constants.CONSTANTS_video_speed
import com.jia.er.nebuluxe.app.databinding.DialogSpeedBinding
import com.jia.er.nebuluxe.app.utils.LOG
import org.greenrobot.eventbus.EventBus
class SpeedDialogFragment : DialogFragment(), View.OnClickListener {
var binding: DialogSpeedBinding? = null
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
binding = DialogSpeedBinding.inflate(layoutInflater)
binding?.btn075?.setOnClickListener(this)
binding?.btn1?.setOnClickListener(this)
binding?.btn15?.setOnClickListener(this)
binding?.btn2?.setOnClickListener(this)
binding?.btn54?.setOnClickListener(this)
binding?.btn72?.setOnClickListener(this)
binding?.btn108?.setOnClickListener(this)
var speed = arguments?.getFloat(CONSTANTS_video_speed)
var quality = arguments?.getFloat(CONSTANTS_video_quality)
binding?.btn075?.isSelected = speed == 0.75F
binding?.btn1?.isSelected = speed == 1F
binding?.btn15?.isSelected = speed == 1.5F
binding?.btn2?.isSelected = speed == 2F
binding?.btn54?.isSelected = quality == 540F
binding?.btn72?.isSelected = quality == 720F
binding?.btn108?.isSelected = quality == 1080F
val builder = AlertDialog.Builder(requireActivity())
builder.setView(binding?.root)
val dialog = builder.create()
dialog.window?.setBackgroundDrawableResource(android.R.color.transparent)
val window = dialog.window
window?.decorView?.setPadding(0, 0, 0, 0)
window?.setGravity(Gravity.BOTTOM)
val layoutParams = window?.attributes
layoutParams?.width = WindowManager.LayoutParams.MATCH_PARENT
layoutParams?.height = WindowManager.LayoutParams.WRAP_CONTENT
window?.attributes = layoutParams
return dialog
}
override fun onClick(p0: View?) {
LOG.d("SpeedDialogFragment", "onClick.34:")
var speed = 1F;
var quality = 540F;
when (p0) {
binding?.btn075 -> {
speed = .75F
}
binding?.btn1 -> {
speed = 1.0F
}
binding?.btn15 -> {
speed = 1.5F
}
binding?.btn2 -> {
speed = 2.0F
}
binding?.btn54 -> {
quality = 540F
}
binding?.btn72 -> {
quality = 720F
}
binding?.btn108 -> {
quality = 1080F
}
}
dismiss()
EventBus.getDefault().post(VideoSettingEvent(speed, quality))
}
}

View File

@ -0,0 +1,27 @@
package com.jia.er.nebuluxe.app.video;
public class VideoSettingEvent {
private Float playSpeed;
private Float qualityValue;
public VideoSettingEvent(Float playSpeed, Float qualityValue) {
this.playSpeed = playSpeed;
this.qualityValue = qualityValue;
}
public Float getPlaySpeed() {
return playSpeed;
}
public void setPlaySpeed(Float playSpeed) {
this.playSpeed = playSpeed;
}
public Float getQualityValue() {
return qualityValue;
}
public void setQualityValue(Float qualityValue) {
this.qualityValue = qualityValue;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#40000000" />
<corners android:radius="@dimen/padding_20px" />
</shape>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ee000000" />
<corners android:radius="@dimen/padding_50px" />
</shape>

View File

@ -1,9 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="@dimen/padding_48px" android:height="@dimen/padding_48px">
<shape android:shape="rectangle">
<solid android:color="#FFDAA4" />
<corners android:topLeftRadius="@dimen/padding_12px" android:topRightRadius="@dimen/padding_0px" android:bottomLeftRadius="@dimen/padding_0px" android:bottomRightRadius="@dimen/padding_12px" />
</shape>
</item>
</selector>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/bg_black" />
<corners android:radius="@dimen/padding_8px" />
<stroke
android:width="1px"
android:color="@color/pink" />
</shape>

View File

@ -1,9 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:width="@dimen/padding_48px" android:height="@dimen/padding_48px">
<shape android:shape="rectangle">
<solid android:color="#15FFD796" />
<corners android:topLeftRadius="@dimen/padding_12px" android:topRightRadius="@dimen/padding_0px" android:bottomLeftRadius="@dimen/padding_0px" android:bottomRightRadius="@dimen/padding_12px" />
</shape>
</item>
</selector>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/bg_black" />
<corners android:radius="@dimen/padding_8px" />
</shape>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<solid android:color="#55FFDAA4" />
</shape>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<solid android:color="#FFDAA4" />
</shape>
</clip>
</item>
</layer-list>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="#FFDAA4"/>
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:topLeftRadius="@dimen/padding_30px"
android:topRightRadius="@dimen/padding_30px" />
<solid android:color="@color/bg_black_light" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/progress">
<clip>
<shape>
<size android:height="@dimen/padding_6px" />
<corners android:radius="@dimen/padding_10px" />
<solid android:color="@color/white" />
</shape>
</clip>
</item>
<item android:id="@android:id/background">
<shape>
<size android:height="@dimen/padding_6px" />
<corners android:radius="@dimen/padding_10px" />
<solid android:color="#33000000" />
</shape>
</item>
</layer-list>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<size
android:width="@dimen/padding_10px"
android:height="@dimen/padding_10px" />
<solid android:color="@color/white" />
</shape>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/bg_example_num_h" android:state_selected="true" />
<item android:drawable="@drawable/bg_example_num_n" />
</selector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/text_color_pink" android:state_selected="true" />
<item android:color="@color/text_color_white" />
</selector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/text_color_pink" android:state_selected="true" />
<item android:color="@color/text_color_gray_DF" />
</selector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:visibility="visible" android:state_selected="true" />
<item android:visibility="gone" />
</selector>

View File

@ -9,7 +9,7 @@
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/padding_84px" />
android:layout_marginBottom="@dimen/padding_54px" />
<com.flyco.tablayout.CommonTabLayout
android:id="@+id/tab_layout"

View File

@ -73,6 +73,7 @@
android:layout_height="@dimen/padding_36px"
android:layout_marginTop="@dimen/padding_15px"
app:layout_constraintLeft_toLeftOf="parent"
android:src="@drawable/ic_dialog_close"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_watch_now_recommend" />

View File

@ -17,8 +17,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/padding_15px"
android:padding="@dimen/padding_10px"
android:layout_marginTop="@dimen/padding_45px"
android:padding="@dimen/padding_10px"
android:src="@drawable/iv_example_back" />
<androidx.appcompat.widget.AppCompatTextView
@ -26,60 +26,140 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/padding_6px"
android:layout_marginTop="@dimen/padding_55px"
android:layout_toLeftOf="@id/iv_btn_more"
android:layout_toRightOf="@id/iv_back_controller"
android:lineSpacingExtra="@dimen/padding_1px"
android:lineSpacingMultiplier="1.1"
android:layout_marginTop="@dimen/padding_55px"
android:layout_toRightOf="@id/iv_back_controller"
android:text="Love Adventure Under Contract"
android:textColor="#FFDAA4"
android:textSize="@dimen/text_size_18px"
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_player_seek_time"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/example_ll_bottom_controller"
android:layout_marginBottom="@dimen/padding_10px"
android:gravity="center_horizontal"
android:textColor="@color/white"
android:textSize="@dimen/text_size_20px"
android:visibility="invisible"
tools:text="00:00/02:24" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_btn_more"
android:layout_width="@dimen/padding_40px"
android:layout_height="@dimen/padding_40px"
android:layout_alignParentRight="true"
android:layout_marginTop="@dimen/padding_55px"
android:layout_marginRight="@dimen/padding_15px"
android:padding="@dimen/padding_10px"
android:src="@drawable/ic_more" />
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/example_ll_bottom_controller"
<LinearLayout
android:id="@+id/cl"
android:layout_width="match_parent"
android:layout_height="@dimen/padding_20px"
android:layout_height="@dimen/padding_36px"
android:layout_alignParentBottom="true"
android:layout_marginLeft="@dimen/padding_19px"
android:layout_marginRight="@dimen/padding_19px"
android:layout_marginBottom="@dimen/padding_9px"
android:gravity="center"
android:orientation="vertical">
android:layout_marginLeft="@dimen/padding_16px"
android:layout_marginTop="@dimen/padding_10px"
android:layout_marginRight="@dimen/padding_16px"
android:layout_marginBottom="@dimen/padding_34px"
android:background="@drawable/bg_conner_20px_trans"
android:gravity="center_vertical"
android:paddingLeft="@dimen/padding_10px"
android:paddingRight="@dimen/padding_10px">
<androidx.appcompat.widget.AppCompatSeekBar
android:id="@+id/example_seekBar_player_controller"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:maxHeight="@dimen/padding_2px"
android:paddingStart="@dimen/padding_0px"
android:paddingEnd="@dimen/padding_0px"
android:progressDrawable="@drawable/bg_example_seekbar_player"
android:splitTrack="false"
android:thumb="@drawable/bg_example_shape_seekbar_player"
android:thumbOffset="@dimen/padding_8px" />
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="@dimen/padding_16px"
android:layout_height="@dimen/padding_16px"
android:src="@drawable/ic_ep_tip" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_ep_current"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/padding_5px"
android:paddingStart="@dimen/padding_6px"
android:paddingEnd="@dimen/padding_6px"
android:textColor="@color/text_color_white"
android:textSize="@dimen/text_size_13px"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="51 Episodes" />
<View
android:layout_width="0dp"
android:layout_height="0px"
android:layout_weight="1" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_ep_total"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/padding_5px"
android:gravity="left"
android:paddingLeft="@dimen/padding_6px"
android:paddingRight="@dimen/padding_6px"
android:textColor="@color/text_color_white"
android:textSize="@dimen/text_size_13px"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="51 Episodes" />
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="@dimen/padding_16px"
android:layout_height="@dimen/padding_16px"
android:src="@drawable/ic_arrow_up_white" />
</LinearLayout>
<com.jia.er.nebuluxe.app.ui.LoadingLine
android:id="@+id/load_line"
android:layout_width="match_parent"
android:layout_height="@dimen/padding_2px"
android:layout_alignParentBottom="true"
android:layout_above="@id/cl"
android:layout_marginLeft="@dimen/padding_19px"
android:layout_marginRight="@dimen/padding_19px"
android:layout_marginBottom="@dimen/padding_18px" />
android:layout_marginBottom="@dimen/padding_25px" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/example_ll_bottom_controller"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/cl"
android:layout_marginLeft="@dimen/padding_19px"
android:layout_marginRight="@dimen/padding_19px"
android:gravity="center"
android:orientation="vertical">
<androidx.appcompat.widget.AppCompatSeekBar
android:id="@+id/example_seekBar_player_controller"
android:layout_width="0dp"
android:layout_height="match_parent"
android:maxHeight="@dimen/padding_2px"
android:paddingStart="@dimen/padding_0px"
android:paddingEnd="@dimen/padding_0px"
android:progressDrawable="@drawable/progress_bar"
android:splitTrack="false"
android:thumb="@drawable/progress_thumb"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_player_seek_time_current"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_color_white"
android:textSize="@dimen/text_size_10px"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/example_seekBar_player_controller"
tools:text="00:00" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_player_seek_time_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/text_color_white"
android:textSize="@dimen/text_size_10px"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/example_seekBar_player_controller"
tools:text="02:24" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/example_iv_play_player_controller"
@ -94,7 +174,7 @@
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/cl"
android:layout_above="@id/load_line"
android:layout_alignParentEnd="true"
android:layout_marginRight="@dimen/padding_16px"
android:layout_marginBottom="@dimen/padding_26px"
@ -120,31 +200,4 @@
</androidx.appcompat.widget.LinearLayoutCompat>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/cl"
android:layout_width="match_parent"
android:layout_height="@dimen/padding_36px"
android:layout_above="@id/example_ll_bottom_controller"
android:layout_marginLeft="@dimen/padding_16px"
android:layout_marginRight="@dimen/padding_16px"
android:layout_marginBottom="@dimen/padding_6px"
>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_ep_total"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/padding_12px"
android:layout_marginRight="@dimen/padding_12px"
android:drawablePadding="@dimen/padding_5px"
android:gravity="left"
android:text="51 Episodes"
android:textColor="#FFE17D"
android:textSize="@dimen/text_size_14px"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>

View File

@ -10,85 +10,86 @@
android:id="@+id/rl"
android:layout_width="match_parent"
android:layout_height="@dimen/padding_509px"
android:background="@drawable/ic_bg_of_video_index"
android:paddingTop="@dimen/padding_19px"
android:paddingBottom="@dimen/padding_15px"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/iv"
android:layout_width="@dimen/padding_64px"
android:layout_height="@dimen/padding_85px"
android:layout_marginLeft="@dimen/padding_15px"
android:scaleType="centerCrop"
android:src="@drawable/ic_default_iv_ver"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:shapeAppearance="@style/CircleCornerStyle" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_content_dialog_series"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/padding_17px"
android:layout_toRightOf="@id/iv"
android:text="Rising Star"
android:textColor="#FFDAA4"
android:textColor="@color/text_color_white"
android:textSize="@dimen/text_size_14px"
android:textStyle="bold" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_des_dialog_series"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_content_dialog_series"
android:layout_alignStart="@id/tv_content_dialog_series"
android:layout_marginTop="@dimen/padding_6px"
android:layout_marginRight="@dimen/padding_16px"
android:layout_toLeftOf="@id/iv_collect"
android:ellipsize="end"
android:maxLines="2"
android:text="Amidst ruins and rebirth, two souls collide in a tale of passion and redemption, where love flickers like a flame in the ashes of their shattered past."
android:textColor="#50FFFFFF"
android:textSize="@dimen/text_size_12px" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_collect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/padding_16px"
android:src="@drawable/iv_example_collection_n" />
<!-- <androidx.appcompat.widget.AppCompatImageView-->
<!-- android:id="@+id/iv_collect"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_alignParentRight="true"-->
<!-- android:layout_marginRight="@dimen/padding_16px"-->
<!-- android:src="@drawable/iv_example_collection_n" />-->
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_tag"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_des_dialog_series"
android:layout_below="@id/tv_content_dialog_series"
android:layout_alignStart="@id/tv_content_dialog_series"
android:layout_marginTop="@dimen/padding_5px"
android:paddingHorizontal="@dimen/padding_6px"
android:text="111"
android:textColor="#FFDAA4"
android:textSize="@dimen/text_size_10px" />
android:textColor="@color/text_color_pink"
android:textSize="@dimen/text_size_10px"
tools:text="111" />
<View
android:id="@+id/line"
android:layout_width="match_parent"
android:layout_height="@dimen/padding_1px"
android:layout_below="@id/tv_tag"
android:layout_marginHorizontal="@dimen/padding_16px"
android:layout_marginTop="@dimen/padding_13px"
android:background="#25FFDAA4" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_des_dialog_series"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignStart="@id/tv_content_dialog_series"
android:layout_alignBottom="@id/iv"
android:ellipsize="end"
android:maxLines="2"
android:paddingEnd="@dimen/padding_16px"
android:textColor="@color/text_color_gray_DF"
android:textSize="@dimen/text_size_10px"
tools:text="Amidst ruins and rebirth, two souls collide in a tale of passion and redemption, where love flickers like a flame in the ashes of their shattered past." />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_ep"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/text_size_14px"
android:text="Episodes"
android:layout_below="@id/iv"
android:layout_alignStart="@id/iv"
android:layout_marginTop="@dimen/padding_12px"
android:layout_alignStart="@id/tv_des_dialog_series"
android:layout_below="@id/line"
android:textColor="#FFFFFF" />
android:text="@string/tip_episodes_in_index_dialog"
android:textColor="@color/text_color_white"
android:textSize="@dimen/text_size_15px" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data_dialog_series"
android:layout_width="match_parent"
android:layout_height="@dimen/padding_240px"
android:layout_height="@dimen/padding_300px"
android:layout_below="@id/tv_ep"
android:layout_marginTop="@dimen/padding_20px"
android:layout_marginTop="@dimen/padding_10px"
android:layout_marginRight="@dimen/padding_15px" />
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,214 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/rl"
android:layout_width="match_parent"
android:layout_height="@dimen/padding_222px"
android:background="@drawable/ic_bg_of_video_index"
android:padding="@dimen/padding_15px"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="@dimen/padding_24px"
android:layout_height="@dimen/padding_24px"
android:src="@drawable/ic_speed" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="@dimen/padding_24px"
android:layout_marginLeft="@dimen/padding_30px"
android:text="@string/dialog_tip_speed"
android:textColor="@color/text_color_white"
android:textSize="@dimen/text_size_15px" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_20px"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingTop="@dimen/padding_6px"
android:paddingBottom="@dimen/padding_14px">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/btn_075"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:paddingTop="@dimen/padding_10px"
android:paddingBottom="@dimen/padding_10px"
android:text="@string/speed_0_75"
android:textColor="@drawable/sel_color_gray_pink"
android:textSize="@dimen/text_size_14px" />
<View
style="@style/VerticalLine"
android:layout_height="@dimen/padding_16px" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/btn_1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:paddingTop="@dimen/padding_10px"
android:paddingBottom="@dimen/padding_10px"
android:text="@string/speed_1"
android:textColor="@drawable/sel_color_gray_pink"
android:textSize="@dimen/text_size_14px" />
<View
style="@style/VerticalLine"
android:layout_height="@dimen/padding_16px" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/btn_125"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:paddingTop="@dimen/padding_10px"
android:paddingBottom="@dimen/padding_10px"
android:text="@string/speed_1_25"
android:textColor="@drawable/sel_color_gray_pink"
android:textSize="@dimen/text_size_14px" />
<View
style="@style/VerticalLine"
android:layout_height="@dimen/padding_16px" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/btn_15"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:paddingTop="@dimen/padding_10px"
android:paddingBottom="@dimen/padding_10px"
android:text="@string/speed_1_5"
android:textColor="@drawable/sel_color_gray_pink"
android:textSize="@dimen/text_size_14px" />
<View
style="@style/VerticalLine"
android:layout_height="@dimen/padding_16px" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/btn_2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:paddingTop="@dimen/padding_10px"
android:paddingBottom="@dimen/padding_10px"
android:text="@string/speed_2_0"
android:textColor="@drawable/sel_color_gray_pink"
android:textSize="@dimen/text_size_14px" />
</LinearLayout>
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="@dimen/padding_24px"
android:layout_height="@dimen/padding_24px"
android:layout_marginTop="@dimen/padding_90px"
android:src="@drawable/ic_quality" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="@dimen/padding_24px"
android:layout_marginLeft="@dimen/padding_30px"
android:layout_marginTop="@dimen/padding_90px"
android:text="@string/dialog_tip_quality"
android:textColor="@color/text_color_white"
android:textSize="@dimen/text_size_15px" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_120px"
android:gravity="center_vertical"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/btn_54"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:paddingTop="@dimen/padding_10px"
android:paddingBottom="@dimen/padding_10px"
android:text="@string/quality_540P"
android:textColor="@drawable/sel_color_gray_pink"
android:textSize="@dimen/text_size_14px" />
<View
style="@style/VerticalLine"
android:layout_height="@dimen/padding_16px" />
<LinearLayout
android:id="@+id/btn_72"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:paddingTop="@dimen/padding_10px"
android:paddingBottom="@dimen/padding_10px">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="@dimen/padding_18px"
android:layout_height="@dimen/padding_18px"
android:src="@drawable/ic_qua_72" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingLeft="@dimen/padding_4px"
android:text="@string/quality_720P"
android:textColor="@drawable/sel_color_gray_pink"
android:textSize="@dimen/text_size_14px" />
</LinearLayout>
<View
style="@style/VerticalLine"
android:layout_height="@dimen/padding_16px" />
<LinearLayout
android:id="@+id/btn_108"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:paddingTop="@dimen/padding_10px"
android:paddingBottom="@dimen/padding_10px">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="@dimen/padding_18px"
android:layout_height="@dimen/padding_18px"
android:src="@drawable/ic_qua_108" />
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingLeft="@dimen/padding_4px"
android:text="@string/quality_1080P"
android:textColor="@drawable/sel_color_gray_pink"
android:textSize="@dimen/text_size_14px" />
</LinearLayout>
</LinearLayout>
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -43,6 +43,7 @@
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/padding_25px"
android:src="@drawable/iv_avatar"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_hello" />
@ -79,13 +80,12 @@
android:textSize="@dimen/text_size_14px" />
</RelativeLayout>
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="@dimen/padding_0px"
android:layout_marginBottom="@dimen/padding_72px"
android:orientation="vertical"
android:paddingTop="@dimen/padding_8px"
android:paddingBottom="@dimen/padding_30px"
android:scrollbars="none"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/rl_top">
@ -182,9 +182,9 @@
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_fs"
android:layout_marginTop="@dimen/padding_6px"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_6px" />
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
@ -307,11 +307,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_12px"
app:normal_drawable="@drawable/iv_indicator_n"
app:selected_drawable="@drawable/iv_indicator_h"
app:layout_constraintLeft_toLeftOf="@id/banner_home_b"
app:layout_constraintRight_toRightOf="@id/banner_home_b"
app:layout_constraintTop_toBottomOf="@id/banner_home_b" />
app:layout_constraintTop_toBottomOf="@id/banner_home_b"
app:normal_drawable="@drawable/iv_indicator_n"
app:selected_drawable="@drawable/iv_indicator_h" />
</androidx.constraintlayout.widget.ConstraintLayout>
@ -319,6 +319,77 @@
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.core.widget.NestedScrollView>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/ll_history"
android:layout_width="match_parent"
android:layout_height="@dimen/padding_50px"
android:layout_marginLeft="@dimen/padding_20px"
android:layout_marginRight="@dimen/padding_20px"
android:background="@drawable/bg_conner_50px_black_history"
android:gravity="center"
android:orientation="horizontal"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
tools:visibility="visible">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_history"
android:layout_width="@dimen/padding_50px"
android:layout_height="@dimen/padding_50px"
android:layout_marginRight="@dimen/padding_25px"
android:src="@drawable/iv_avatar"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_his_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/padding_10px"
android:textColor="@color/text_color_white"
android:textSize="@dimen/text_size_14px"
app:layout_constraintBottom_toTopOf="@id/tv_his_ep"
app:layout_constraintLeft_toRightOf="@id/iv_history"
app:layout_constraintRight_toLeftOf="@id/iv_his_play"
app:layout_constraintTop_toTopOf="parent"
tools:text="fake marriage true love" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_his_ep"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:paddingLeft="@dimen/padding_10px"
android:textColor="@color/text_color_gray_DF"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="@id/iv_history"
app:layout_constraintRight_toLeftOf="@id/iv_his_play"
app:layout_constraintTop_toBottomOf="@id/tv_his_title"
tools:text="fake marriage true love" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_his_play"
android:layout_width="@dimen/padding_40px"
android:layout_height="@dimen/padding_40px"
android:padding="@dimen/padding_11px"
android:src="@drawable/ic_play_his"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toLeftOf="@id/iv_his_close"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_his_close"
android:layout_width="@dimen/padding_40px"
android:layout_height="@dimen/padding_40px"
android:padding="@dimen/padding_11px"
android:src="@drawable/ic_close_his"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</com.scwang.smart.refresh.layout.SmartRefreshLayout>

View File

@ -1,27 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/item_pan"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/padding_11px"
android:layout_marginTop="@dimen/padding_11px">
android:layout_marginTop="@dimen/padding_11px"
android:background="@drawable/sel_bg_example_num">
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/example_tv_num_data"
android:layout_width="match_parent"
android:layout_height="@dimen/padding_48px"
android:gravity="center"
android:textColor="@drawable/sel_color_example_num"
android:textSize="@dimen/text_size_16px"
android:textStyle="bold"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- <androidx.appcompat.widget.AppCompatImageView-->
<!-- android:id="@+id/iv_example_lock"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:src="@drawable/iv_lock"-->
<!-- app:layout_constraintRight_toRightOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_example_playing"
android:layout_width="@dimen/padding_9px"
android:layout_height="@dimen/padding_12px"
android:layout_margin="@dimen/padding_6px"
android:src="@drawable/ic_play"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/iv_example_lock"
android:layout_width="@dimen/padding_12px"
android:layout_height="@dimen/padding_12px"
android:layout_margin="@dimen/padding_6px"
android:src="@drawable/ic_lock"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="@android:color/transparent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:background="@android:color/transparent">
<View
android:id="@+id/loadingView"

View File

@ -56,9 +56,9 @@
android:maxHeight="@dimen/padding_2px"
android:paddingStart="@dimen/padding_0px"
android:paddingEnd="@dimen/padding_0px"
android:progressDrawable="@drawable/bg_example_seekbar_player"
android:progressDrawable="@drawable/progress_bar"
android:splitTrack="false"
android:thumb="@drawable/bg_example_shape_seekbar_player"
android:thumb="@drawable/progress_thumb"
android:thumbOffset="@dimen/padding_8px" />
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@ -36,5 +36,18 @@
<string name="dialog_content_remove_favorites">This drama will be removed from your favorites.</string>
<string name="dialog_confirm_btn_remove_favorites">Remove</string>
<string name="dialog_cancel_btn_remove_favorites">Cancel</string>
<string name="toast_no_result_of_keyword">未搜索到结果</string>
<string name="toast_no_result_of_keyword">No results found</string>
<string name="tip_episodes_in_index_dialog">Episodes (%d)</string>
<string name="ep_">EP.%d</string>
<string name="ep_all_">All %d Episodes</string>
<string name="dialog_tip_speed">Speed</string>
<string name="speed_0_75">0.75</string>
<string name="speed_1">1.0</string>
<string name="speed_1_25">1.25</string>
<string name="speed_1_5">1.5</string>
<string name="speed_2_0">2.0</string>
<string name="dialog_tip_quality">Quality</string>
<string name="quality_540P">540P</string>
<string name="quality_720P">720P</string>
<string name="quality_1080P">1080P</string>
</resources>

View File

@ -21,4 +21,10 @@
<item name="android:layout_height">1px</item>
<item name="android:layout_width">match_parent</item>
</style>
<style name="VerticalLine">
<item name="android:background">@color/text_color_white</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_width">1px</item>
</style>
</resources>