Commit 95043aa9 authored by jyx's avatar jyx

听书列表布局错误修复

parent f85bb03a
......@@ -551,13 +551,10 @@
# ===================== 喜马拉雅 START ================
-dontwarn com.google.gson.**
-dontwarn android.support.**
-keep class android.support.** { *;}
-dontwarn com.ximalaya.ting.android.player.**
-keep class com.ximalaya.ting.android.player.** { *;}
-dontwarn com.ximalaya.ting.android.opensdk.**
-keep interface com.ximalaya.ting.android.opensdk.** {*;}
-keep class com.ximalaya.ting.android.opensdk.** { *; }
......
......@@ -3,7 +3,6 @@ package com.mints.goodmoney.ui.activitys
import android.os.Bundle
import android.view.View
import android.widget.SeekBar
import android.widget.Toast
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import com.mints.goodmoney.MintsApplication
......@@ -300,7 +299,7 @@ class XmlyPlayActivity : BaseActivity(), View.OnClickListener, XmlyPlayAdapter.O
override fun onError(exception: XmPlayerException): Boolean {
play_or_pause.setImageResource(R.mipmap.widget_play_normal)
if (!NetworkType.isConnectTONetWork(mContext)) {
Toast.makeText(this@XmlyPlayActivity, "网络出小差儿了~", Toast.LENGTH_SHORT).show()
showToast("网络出小差儿了~")
}
return false
}
......@@ -412,7 +411,6 @@ class XmlyPlayActivity : BaseActivity(), View.OnClickListener, XmlyPlayAdapter.O
}
override fun finish() {
if (mPlayerManager.isPlaying && mStartListenTime != 0L) {
mListenTime += System.currentTimeMillis() - mStartListenTime
}
......
......@@ -36,13 +36,12 @@ class XmlyPlayAdapter(val xmlyPageList: MutableList<Track>, val xmlyUnlockList:
holder.tvIndex.text = (position + 1).toString()
holder.tvTitle.text = track.trackTitle
holder.tvCount.text = ToolUtil.formatNum(track.playCount.toString(), false)
holder.ivIsLock.setImageResource(R.mipmap.icon_lock)
for (s in xmlyUnlockList) {
if (position == 0 || position == 1) {
holder.ivIsLock.setImageResource(R.mipmap.icon_unlock)
} else if (position == s.toInt() - 1) {
if (position >= s.toInt() - 1) {
if (s.toInt() - 1 == position) {
holder.ivIsLock.setImageResource(R.mipmap.icon_unlock)
} else {
holder.ivIsLock.setImageResource(R.mipmap.icon_lock)
}
}
}
......
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