Commit 95043aa9 authored by jyx's avatar jyx

听书列表布局错误修复

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