Commit 5c16b790 authored by jyx's avatar jyx

添加尊享页面

parent 7e4d8377
package com.duben.speedplaylet.ad.express
import android.net.Uri
import android.text.TextUtils
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.*
import com.bumptech.glide.Glide
import com.bytedance.sdk.openadsdk.*
import com.bytedance.sdk.openadsdk.mediation.ad.MediationExpressRenderListener
import com.bytedance.sdk.openadsdk.mediation.ad.MediationViewBinder
import com.duben.speedplaylet.BuildConfig
import com.duben.speedplaylet.MintsApplication
import com.duben.speedplaylet.R
import com.duben.speedplaylet.utils.ForegroundOrBackground
import com.duben.speedplaylet.utils.LogUtil
import com.duben.speedplaylet.utils.UIUtils
import java.lang.Exception
import java.util.ArrayList
private val TAG = MainExpressManager::class.java.simpleName
......
......@@ -40,11 +40,12 @@ object Constant {
/**
* app应用首页 0-主页 1-中间 2-我
* app应用首页 0-主页 1-中间 2-尊享 3-
*/
const val FRAGMENT_CLICK_ONE = 0
const val FRAGMENT_CLICK_TWO = 1
const val FRAGMENT_CLICK_THREE = 2
const val FRAGMENT_CLICK_FOUR = 3
// 协议地址
var REGISTER_URL = "http://mints-web.mints-id.com/agreements/speedplaylet/yhxy.html"//注册协议
......
......@@ -54,45 +54,6 @@ class VideoPresenter : BasePresenter<VideoView>() {
})
}
fun getIndexList2(thirdId: String, csj: Boolean = false) {
val vo = HashMap<String, Any>()
vo["vedioId"] = thirdId
AppHttpManager.getInstance(loanApplication)
.call(loanService.getIndexList2(vo),
object : BaseSubscriber<BaseResponse<IndexList>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<IndexList>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> view.getIndexListSuc(baseResponse.data)
else -> {
view.getIndexListFail()
view.showToast(message)
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
view.getIndexListFail()
}
})
}
fun collect(videoId: String) {
val vo = HashMap<String, Any>()
vo["vedioId"] = videoId
......
package com.duben.speedplaylet.mvp.presenters
import com.duben.library.net.neterror.BaseSubscriber
import com.duben.library.net.neterror.Throwable
import com.duben.speedplaylet.manager.AppHttpManager
import com.duben.speedplaylet.mvp.model.BannerList
import com.duben.speedplaylet.mvp.model.BaseResponse
import com.duben.speedplaylet.mvp.views.VipEnjoyView
/**
* @author Assen
* @date 2023/12/5
* @desc
*/
class VipEnjoyPresenter : BasePresenter<VipEnjoyView>() {
fun getVedio4List(page: Int, pageCount: Int) {
val vo = hashMapOf<String, Any>()
vo["page"] = page
vo["size"] = pageCount
AppHttpManager.getInstance(loanApplication)
.call(loanService.vedio4List(vo),
object : BaseSubscriber<BaseResponse<BannerList>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.showToast(e.message)
view.getVedio4ListFail()
}
override fun onNext(baseResponse: BaseResponse<BannerList>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
view.getVedio4ListSuc(baseResponse.data)
}
else -> {
view.showToast(message)
view.getVedio4ListFail()
}
}
}
})
}
}
\ No newline at end of file
package com.duben.speedplaylet.mvp.views
import com.duben.speedplaylet.mvp.model.BannerList
interface VipEnjoyView : BaseView {
fun getVedio4ListSuc(bannerList: BannerList)
fun getVedio4ListFail()
}
\ No newline at end of file
......@@ -212,7 +212,7 @@ public interface LoanService {
*
* @return
*/
@POST("api/vedio/getIndexList/vedio3")
@POST("api/vedio/getIndexList")
Observable<BaseResponse<IndexList>> getIndexList2(@Body Map<String, Object> vo);
/**
......@@ -323,6 +323,11 @@ public interface LoanService {
@POST("api/vedio/vedio4Msg")
Observable<BaseResponse<RecommendBannerList>> vedio4Msg(@Body Map<String, Object> vo);
/**
* Vip尊享剧场
*/
@POST("api/vedio/vedio4List")
Observable<BaseResponse<BannerList>> vedio4List(@Body Map<String, Object> vo);
/**
* 默认http工厂
......
......@@ -19,6 +19,7 @@ import com.duben.speedplaylet.ui.activitys.base.BaseActivity
import com.duben.speedplaylet.ui.fragment.MainFragment
import com.duben.speedplaylet.ui.fragment.MyFragment
import com.duben.speedplaylet.ui.fragment.RecommendFragment
import com.duben.speedplaylet.ui.fragment.VipEnjoyFragment
import com.duben.speedplaylet.ui.widgets.DialogListener
import com.duben.speedplaylet.ui.widgets.PhoneDialog
import com.duben.speedplaylet.video.csj.DPHolderManager
......@@ -35,6 +36,7 @@ class MainActivity : BaseActivity(), View.OnClickListener {
var tabIvLoan: TextView? = null
var tabIvRecommend: TextView? = null
var tabIvEnjoy: TextView? = null
var tabIvMy: TextView? = null
private var mShowBlack = false
......@@ -43,6 +45,8 @@ class MainActivity : BaseActivity(), View.OnClickListener {
private var mainFragment: Fragment? = null
private var recommendFragment: Fragment? = null
private var myFragment: Fragment? = null
private var vipEnjoyFragment: Fragment? = null
private var currentFragment: Fragment? = null
private var phoneDialog: PhoneDialog? = null
......@@ -57,10 +61,20 @@ class MainActivity : BaseActivity(), View.OnClickListener {
tabIvLoan = findViewById(R.id.tab_iv_loan)
tabIvRecommend = findViewById(R.id.tab_iv_recommend)
tabIvEnjoy = findViewById(R.id.tab_iv_enjoy)
tabIvMy = findViewById(R.id.tab_iv_my)
findViewById<View>(R.id.tab_rl_loan).setOnClickListener(this)
findViewById<View>(R.id.tab_rl_recommend).setOnClickListener(this)
findViewById<View>(R.id.tab_rl_enjoy).setOnClickListener(this)
findViewById<View>(R.id.tab_rl_my).setOnClickListener(this)
if (AppConfig.showVipVedio) {
// 显示尊享页面
tab_rl_enjoy.visibility = View.VISIBLE
} else {
tab_rl_enjoy.visibility = View.GONE
}
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_ONE
if (mainFragment == null) {
mainFragment = MainFragment()
......@@ -135,7 +149,8 @@ class MainActivity : BaseActivity(), View.OnClickListener {
when (view.id) {
R.id.tab_rl_loan -> clickTab1Layout()
R.id.tab_rl_recommend -> clickTab2Layout()
R.id.tab_rl_my -> clickTab3Layout()
R.id.tab_rl_enjoy -> clickTab3Layout()
R.id.tab_rl_my -> clickTab4Layout()
}
}
......@@ -150,6 +165,7 @@ class MainActivity : BaseActivity(), View.OnClickListener {
addOrShowFragment(supportFragmentManager.beginTransaction(), mainFragment!!)
tabIvLoan!!.isSelected = true
tabIvRecommend!!.isSelected = false
tabIvEnjoy!!.isSelected = false
tabIvMy!!.isSelected = false
changeBottomTabColor(false)
}
......@@ -165,6 +181,7 @@ class MainActivity : BaseActivity(), View.OnClickListener {
addOrShowFragment(supportFragmentManager.beginTransaction(), recommendFragment!!)
tabIvLoan!!.isSelected = false
tabIvRecommend!!.isSelected = true
tabIvEnjoy!!.isSelected = false
tabIvMy!!.isSelected = false
changeBottomTabColor(mShowBlack)
}
......@@ -174,17 +191,33 @@ class MainActivity : BaseActivity(), View.OnClickListener {
*/
fun clickTab3Layout() {
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_THREE
if (myFragment == null) {
vipEnjoyFragment = VipEnjoyFragment.newInstance()
}
addOrShowFragment(supportFragmentManager.beginTransaction(), vipEnjoyFragment!!)
tabIvLoan!!.isSelected = false
tabIvRecommend!!.isSelected = false
tabIvEnjoy!!.isSelected = true
tabIvMy!!.isSelected = false
changeBottomTabColor(false)
}
/**
* 点击第三个tab
*/
fun clickTab4Layout() {
AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_FOUR
if (myFragment == null) {
myFragment = MyFragment()
}
addOrShowFragment(supportFragmentManager.beginTransaction(), myFragment!!)
tabIvLoan!!.isSelected = false
tabIvRecommend!!.isSelected = false
tabIvEnjoy!!.isSelected = false
tabIvMy!!.isSelected = true
changeBottomTabColor(false)
}
/**
* 添加或者显示碎片
*
......
package com.duben.wisdomclean.ui.adapter
import android.annotation.SuppressLint
import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.duben.speedplaylet.R
import com.duben.speedplaylet.mvp.model.VedioBean
import com.duben.library.utils.GlideUtils
class HotStyleAdapter(val context: Context, val dataList: ArrayList<VedioBean>?) :
RecyclerView.Adapter<HotStyleAdapter.ViewHolder>() {
lateinit var mOnItemClickListener: OnItemClickListener
inner class ViewHolder(view: View) : RecyclerView.ViewHolder(view) {
val ivVedioItem: ImageView = view.findViewById(R.id.ivVedioItem)
val tvVedioItemCount: TextView = view.findViewById(R.id.tvVedioItemCount)
val tvVedioItemTitle: TextView = view.findViewById(R.id.tvVedioItemTitle)
val tvVedioItemText: TextView = view.findViewById(R.id.tvVedioItemText)
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(context).inflate(R.layout.item_hot_style, parent, false)
return ViewHolder(view)
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
val topBean = dataList?.get(position)
if (topBean != null) {
holder.tvVedioItemCount.text =
"${if (topBean.completeStatus == 0) "已完结" else "更新至${topBean.vedioTotal}"}"
holder.tvVedioItemTitle.text = "${topBean.title}"
holder.tvVedioItemText.text = "${topBean.vedioDesc}"
GlideUtils.loadImageViewGifForCenterCrop(
context,
topBean.coverImage,
holder.ivVedioItem
)
}
holder.itemView.setOnClickListener {
mOnItemClickListener.onItemClick(position)
}
holder.itemView.setTag(position)
}
override fun getItemCount(): Int = dataList?.size ?: 0
interface OnItemClickListener {
fun onItemClick(position: Int)
}
fun setOnItemClickListener(listener: OnItemClickListener) {
mOnItemClickListener = listener
}
}
\ No newline at end of file
package com.duben.speedplaylet.ui.adapter
import android.view.View
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.duben.library.utils.GlideUtils
import com.duben.speedplaylet.R
import com.duben.speedplaylet.mvp.model.*
class VipEnjoyAdapter : BaseQuickAdapter<VedioBean, BaseViewHolder>(R.layout.item_vip_enjoy) {
override fun convert(holder: BaseViewHolder, item: VedioBean) {
holder.getView<TextView>(R.id.title_tv).text = item.title
holder.getView<TextView>(R.id.info_tv).text = item.vedioDesc
holder.getView<TextView>(R.id.complete_tv).text =
if (item.completeStatus == 0) "已完结" else "更新中"
GlideUtils.loadImageViewGifForCenterCrop(
context,
item.coverImage,
holder.getView(R.id.image_iv),
12
)
holder.getView<View>(R.id.item).setOnClickListener { it1 ->
mOnCustomChildClickListener?.onCustomChildClick(it1, item)
}
}
private var mOnCustomChildClickListener: OnCustomChildClickListener? = null
fun setOnCustomChildClickListener(onCustomChildClickListener: OnCustomChildClickListener) {
this.mOnCustomChildClickListener = onCustomChildClickListener
}
interface OnCustomChildClickListener {
fun onCustomChildClick(view: View, vedioBean: VedioBean)
}
}
\ No newline at end of file
......@@ -18,7 +18,6 @@ import com.duben.speedplaylet.ui.fragment.base.LazyLoadBaseFragment
import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener
import com.duben.speedplaylet.common.AppConfig
import com.duben.speedplaylet.manager.UserManager
import com.duben.speedplaylet.ui.adapter.NewHotStyleAdapter
import com.duben.speedplaylet.utils.CommonUtils
import kotlinx.android.synthetic.main.fragment_movie.*
......
......@@ -86,7 +86,7 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
override fun onFragmentResume() {
super.onFragmentResume()
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_THREE) {
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_FOUR) {
if (AntiShake.check(ll_my_record?.id)) return
if(userManager.vipFlag){
......
package com.duben.speedplaylet.ui.fragment
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import androidx.fragment.app.Fragment
import androidx.recyclerview.widget.GridLayoutManager
import com.duben.speedplaylet.R
import com.duben.speedplaylet.common.AppConfig
import com.duben.speedplaylet.common.Constant
import com.duben.speedplaylet.manager.LocalVedioManager
import com.duben.speedplaylet.mvp.model.BannerList
import com.duben.speedplaylet.mvp.model.VedioBean
import com.duben.speedplaylet.mvp.presenters.VipEnjoyPresenter
import com.duben.speedplaylet.mvp.views.VipEnjoyView
import com.duben.speedplaylet.ui.adapter.VipEnjoyAdapter
import com.duben.speedplaylet.ui.fragment.base.LazyLoadBaseFragment
import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener
import kotlinx.android.synthetic.main.fragment_vip_enjoy.*
/**
* @author Assen
* @date 2023/12/5
* @desc VIP尊享页面
*/
class VipEnjoyFragment : LazyLoadBaseFragment(), OnLoadMoreListener, VipEnjoyView {
companion object {
fun newInstance(): Fragment {
val args = Bundle()
val fragment = VipEnjoyFragment()
fragment.arguments = args
return fragment
}
}
private val vipEnjoyPresenter by lazy { VipEnjoyPresenter() }
private lateinit var vipEnjoyAdapter: VipEnjoyAdapter
private var page = 1 // 分页
private var pageSize = Constant.PAGE_SIZE // 分页
override fun initViewsAndEvents() {
vipEnjoyPresenter.attachView(this)
initView()
initListener()
}
override fun onResume() {
super.onResume()
onRefresh()
}
override fun onDetach() {
super.onDetach()
vipEnjoyPresenter.detachView()
}
override fun getContentViewLayoutID() = R.layout.fragment_vip_enjoy
private fun initView() {
rv_enjoy.layoutManager = GridLayoutManager(context, 2)
vipEnjoyAdapter = VipEnjoyAdapter()
vipEnjoyAdapter.animationEnable = false
rv_enjoy.adapter = vipEnjoyAdapter
val emptyView =
LayoutInflater.from(requireContext()).inflate(R.layout.item_empty_data, null)
vipEnjoyAdapter.setEmptyView(emptyView)
vipEnjoyAdapter.setOnCustomChildClickListener(object :
VipEnjoyAdapter.OnCustomChildClickListener {
override fun onCustomChildClick(view: View, vedioBean: VedioBean) {
LocalVedioManager.startVedioDetailActivityForType(
requireActivity(),
vedioBean
)
}
})
}
private fun initListener() {
srl_enjoy.setEnableRefresh(false)
srl_enjoy.setOnLoadMoreListener(this)
}
private fun onRefresh() {
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_THREE) {
page = 1
srl_enjoy.resetNoMoreData()
vipEnjoyPresenter.getVedio4List(page, pageSize)
}
}
override fun onLoadMore(refreshLayout: RefreshLayout) {
page = ++page
vipEnjoyPresenter.getVedio4List(page, pageSize)
}
override fun getVedio4ListSuc(data: BannerList) {
if (activity == null || requireActivity().isFinishing) {
srl_enjoy?.finishRefresh(true)
return
}
if (::vipEnjoyAdapter.isInitialized) {
if (page == 1) {
srl_enjoy.finishRefresh(true)
vipEnjoyAdapter.setNewInstance(data.list)
} else {
if (data.list.size < pageSize) {
srl_enjoy.finishLoadMoreWithNoMoreData()
} else {
srl_enjoy.finishLoadMore()
}
vipEnjoyAdapter.addData(data.list)
}
}
}
override fun getVedio4ListFail() {
}
}
\ No newline at end of file
package com.duben.speedplaylet.video.tx.newrecommend
import android.app.Dialog
import android.os.Bundle
import android.view.View
import androidx.core.content.ContextCompat
......@@ -20,12 +21,13 @@ import com.duben.speedplaylet.ui.activitys.NineActivity
import com.duben.speedplaylet.ui.activitys.VipActivity
import com.duben.speedplaylet.ui.activitys.base.BaseActivity
import com.duben.speedplaylet.ui.adapter.VideoEpisodeAdapter
import com.duben.speedplaylet.ui.widgets.NewVideoEpisodeDialog
import com.duben.speedplaylet.utils.AppPreferencesManager
import com.duben.speedplaylet.utils.SpanUtils
import com.duben.speedplaylet.video.tx.VideoModel
import com.duben.library.utils.GlideUtils
import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.speedplaylet.ui.widgets.DialogListener
import com.duben.speedplaylet.ui.widgets.VideoEpisodeDialog
import kotlinx.android.synthetic.main.activity_new_tx_video.*
/**
......@@ -38,7 +40,7 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
private var mAllData = arrayListOf<VedioEpisodeBean>()
private var dialog: NewVideoEpisodeDialog? = null
private var dialog: VideoEpisodeDialog? = null
private val videoPresenter by lazy { VideoPresenter() }
......@@ -52,7 +54,7 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
override fun initViewsAndEvents() {
videoPresenter.attachView(this)
mVedioBean?.let { videoPresenter.getIndexList2("" + it.vedioId) }
mVedioBean?.let { videoPresenter.getIndexList("" + it.vedioId) }
initView()
}
......@@ -75,7 +77,7 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
if (mVipFlag != UserManager.getInstance().vipFlag && UserManager.getInstance().vipFlag) {
// 重置状态
playIndex = new_super_short_video_view.currentPosition
mVedioBean?.let { videoPresenter.getIndexList2("" + it.vedioId) }
mVedioBean?.let { videoPresenter.getIndexList("" + it.vedioId) }
}
}
......@@ -149,11 +151,16 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
mVedioBean?.let {
vedioBean.title = it.title
vedioBean.vedioTotal = it.vedioTotal
vedioBean.unlockIndex = it.unlockIndex
vedioBean.seeIndex = it.seeIndex
vedioBean.vedioTotal = it.vedioTotal
}
dialog = NewVideoEpisodeDialog(this, vedioBean, new_super_short_video_view.data)
dialog = VideoEpisodeDialog(this, vedioBean, object : DialogListener() {
override fun onClick(dialog: Dialog?, v: View?) {
super.onClick(dialog, v)
dialog?.dismiss()
}
})
dialog?.setCurrentIndex(new_super_short_video_view.realSeeIndex)
dialog?.setOnEpisodeClickListener(this)
dialog?.show()
......@@ -225,14 +232,14 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
override fun onEpisodeClick(position: Int) {
dialog?.dismiss()
// val data = new_super_short_video_view.data
// if (position >= mVedioBean!!.unlockIndex) {
// new_super_short_video_view.onItemClick(data.size - 1)
// return
// }
val data = new_super_short_video_view.data
if (position >= mVedioBean!!.unlockIndex) {
new_super_short_video_view.onItemClick(data.size - 1)
return
}
// val readPosition = getRealPosition(position + 1)
val readPosition = position
val readPosition = getRealPosition(position + 1)
// val readPosition = position
new_super_short_video_view.onItemClick(readPosition)
}
......@@ -241,39 +248,20 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
val data = mutableListOf<VideoMultiItemEntity4>()
for (i in 0 until mAllData.size) {
val item = mAllData[i]
when (mAllData[i].dos) {
VEDIO3DOS_FREE -> {
data.add(
i,
VideoMultiItemEntity4(
MULTI_ITEM_1,
item,
VideoModel(item.vedioUrl),
VEDIO3DOS_FREE
)
VideoMultiItemEntity4(MULTI_ITEM_1, item, VideoModel(item.vedioUrl), VEDIO3DOS_FREE)
)
}
VEDIO3DOS_AD -> {
data.add(
i, VideoMultiItemEntity4(
MULTI_ITEM_2,
item,
VideoModel(item.vedioUrl),
VEDIO3DOS_AD
)
)
}
VEDIO3DOS_PAY -> {
data.add(
i, VideoMultiItemEntity4(
if (mVedioBean!!.unlockIndex < mVedioBean!!.vedioTotal) {
val item =
VideoMultiItemEntity4(
MULTI_ITEM_2,
item,
VideoModel(item.vedioUrl),
mAllData[0],
VideoModel(mAllData[0].vedioUrl),
VEDIO3DOS_PAY
)
)
}
}
data.add(item)
}
return data
}
......
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#50000000" />
<corners android:bottomLeftRadius="12dp"
android:bottomRightRadius="12dp"/>
</shape>
\ No newline at end of file
......@@ -64,6 +64,25 @@
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/tab_rl_enjoy"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:id="@+id/tab_iv_enjoy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="尊享"
android:textColor="@color/item_text_sel"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/tab_rl_my"
android:layout_width="0dp"
......
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@mipmap/bg_main"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="70dp"
android:layout_marginStart="@dimen/dp_10"
android:paddingTop="20dp"
android:src="@mipmap/ic_enjoy_label" />
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/srl_enjoy"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="70dp"
app:srlAccentColor="@color/black"
app:srlPrimaryColor="#f0f2f5">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_enjoy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="14dp"
android:layout_marginRight="14dp"
android:minHeight="800dp"
android:overScrollMode="never" />
</FrameLayout>
<com.scwang.smartrefresh.layout.footer.ClassicsFooter
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srlAccentColor="@color/black"
app:srlPrimaryColor="#f0f2f5" />
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</FrameLayout>
\ No newline at end of file
......@@ -7,11 +7,19 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:paddingBottom="100dp"
android:src="@mipmap/icon_list_null" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:paddingTop="60dp"
android:text="暂无数据"
android:textColor="@color/black"
android:textColor="@color/graya"
android:textSize="18sp" />
</RelativeLayout>
\ No newline at end of file
<?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"
android:layout_width="match_parent"
android:layout_height="256dp"
android:layout_marginBottom="4dp"
android:paddingLeft="5dp"
android:paddingRight="5dp">
<ImageView
android:id="@+id/image_iv"
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_marginTop="4dp"
android:scaleType="centerCrop"
android:src="@mipmap/ic_launcher_main"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:src="@mipmap/ic_enjoy_tint"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_shape_enjoy"
app:layout_constraintBottom_toBottomOf="@id/image_iv"
app:layout_constraintEnd_toEndOf="@id/image_iv">
<TextView
android:id="@+id/complete_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:gravity="right"
android:paddingStart="6dp"
android:paddingTop="2dp"
android:paddingEnd="8dp"
android:paddingBottom="2dp"
android:text="已完结"
android:textColor="@color/white"
android:textSize="12sp" />
</RelativeLayout>
<TextView
android:id="@+id/title_tv"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:ellipsize="end"
android:maxLines="1"
android:text="重回80年代"
android:textColor="@color/black"
app:layout_constraintStart_toStartOf="@id/image_iv"
app:layout_constraintTop_toBottomOf="@id/image_iv" />
<TextView
android:id="@+id/info_tv"
android:layout_width="106dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:ellipsize="end"
android:maxLines="1"
android:text="重回80年代"
android:textColor="@color/gray"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="@id/image_iv"
app:layout_constraintTop_toBottomOf="@id/title_tv" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment