Commit 571e229f authored by jyx's avatar jyx

代码优化

parent b0c526b3
......@@ -480,16 +480,6 @@
-keep class **.R$* { public static final int mbridge*; }
# ======================= 穿山甲 GroMore END ================
-keep public class cn.jzvd.JZMediaSystem {*; }
-keep public class cn.jzvd.demo.CustomMedia.CustomMedia {*; }
-keep public class cn.jzvd.demo.CustomMedia.JZMediaIjk {*; }
-keep public class cn.jzvd.demo.CustomMedia.JZMediaSystemAssertFolder {*; }
-keep class tv.danmaku.ijk.media.player.** {*; }
-dontwarn tv.danmaku.ijk.media.player.*
-keep interface tv.danmaku.ijk.media.player.** { *; }
# ======================= 腾讯播放器 END ================
-keep class com.tencent.** { *; }
# ======================= 腾讯播放器 END ================
......@@ -118,7 +118,7 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
override fun initViewsAndEvents() {
videoPresenter.attachView(this)
mVedioBean?.let { videoPresenter.getIndexList(it.thirdId,true) }
mVedioBean?.let { videoPresenter.getIndexList(it.thirdId, true) }
fm_bottom.setOnClickListener {
if (AntiShake.check(it.id)) return@setOnClickListener
......@@ -148,9 +148,11 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
info_tv.text = String.format("第%d集", it.index + 1)
unlock.text = String.format("看广告解锁%d集", lockSet)
if (mVedioBean!!.collect == 0) {
zan_iv.setImageResource(R.mipmap.home_collect_img_0)
setCollectImage(zan_iv)
// zan_iv.setImageResource(R.mipmap.home_collect_img_0)
} else {
zan_iv.setImageResource(R.mipmap.home_collect_img_1)
setCancelCollectImage(zan_iv)
// zan_iv.setImageResource(R.mipmap.home_collect_img_1)
}
zan_num_tv.text = mVedioBean!!.hot
}
......@@ -611,4 +613,24 @@ class DramaApiDetailActivity : BaseActivity(), VideoEpisodeAdapter.OnEpisodeClic
.show()
}
private fun setCollectImage(view: LottieAnimationView) {
val lottieDrawable = LottieDrawable()
LottieCompositionFactory.fromAsset(context, "home_collect.json")
.addListener { result: LottieComposition? ->
lottieDrawable.setImagesAssetsFolder("images/")
lottieDrawable.composition = result
}
view.setImageDrawable(lottieDrawable)
}
private fun setCancelCollectImage(view: LottieAnimationView) {
val lottieDrawable = LottieDrawable()
LottieCompositionFactory.fromAsset(context, "home_cancel_collect.json")
.addListener { result: LottieComposition? ->
lottieDrawable.setImagesAssetsFolder("images/")
lottieDrawable.composition = result
}
view.setImageDrawable(lottieDrawable)
}
}
\ No newline at end of file
......@@ -146,6 +146,7 @@ public class SuperShortVideoView extends RelativeLayout {
if (position == mUrlList.size()) {
if (mBaseItemView != null) {
mLastPositionInIDLE = -1;
mBaseItemView.stopForPlaying();
}
return;
......@@ -161,7 +162,7 @@ public class SuperShortVideoView extends RelativeLayout {
List<VideoModel> tempUrlList = initUrlList(position, MAX_PLAYER_COUNT_ON_PASS);
mPlayerManager.updateManager(tempUrlList);
TXVodPlayerWrapper txVodPlayerWrapper = mPlayerManager.getPlayer(mUrlList.get(position));
if(txVodPlayerWrapper!=null){
if (txVodPlayerWrapper != null) {
Log.i(TAG, "txVodPlayerWrapper " + txVodPlayerWrapper + "url-- " + mUrlList.get(position).videoURL);
Log.i(TAG, "txVodPlayerWrapper " + txVodPlayerWrapper);
mBaseItemView.setTXVodPlayer(txVodPlayerWrapper);
......
......@@ -2,7 +2,7 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_height="206dp"
android:layout_marginLeft="3dp"
android:layout_marginRight="3dp"
android:layout_marginBottom="10dp">
......
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