听书界面显示错误
This commit is contained in:
2 files changed
+15
-16
No files matched your search
@@ -101,7 +101,7 @@ class AudioPlayActivity :
|
|||||||
private var secondaryContainerFinalColor: Int = 0
|
private var secondaryContainerFinalColor: Int = 0
|
||||||
private var currentJob: Job? = null
|
private var currentJob: Job? = null
|
||||||
private var wrappedContext: Context? = null
|
private var wrappedContext: Context? = null
|
||||||
private val lyricViewX by lazy { binding.lyricViewX }
|
// private val lyricViewX by lazy { binding.lyricViewX }
|
||||||
private var lyricOn = false
|
private var lyricOn = false
|
||||||
private var oldLyric: String? = null
|
private var oldLyric: String? = null
|
||||||
|
|
||||||
@@ -530,7 +530,7 @@ class AudioPlayActivity :
|
|||||||
binding.tvDurTime.setTextColor(color)
|
binding.tvDurTime.setTextColor(color)
|
||||||
binding.tvAllTime.setTextColor(color)
|
binding.tvAllTime.setTextColor(color)
|
||||||
// 更新歌词高亮颜色
|
// 更新歌词高亮颜色
|
||||||
binding.lyricViewX.setCurrentColor(color)
|
// binding.lyricViewX.setCurrentColor(color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -733,6 +733,7 @@ class AudioPlayActivity :
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun upLyric(lyric: String?) {
|
override fun upLyric(lyric: String?) {
|
||||||
|
/*
|
||||||
if (oldLyric == lyric) return
|
if (oldLyric == lyric) return
|
||||||
oldLyric = lyric
|
oldLyric = lyric
|
||||||
if (lyric.isNullOrBlank()) {
|
if (lyric.isNullOrBlank()) {
|
||||||
@@ -776,10 +777,13 @@ class AudioPlayActivity :
|
|||||||
upLyricP(AudioPlay.durChapterPos)
|
upLyricP(AudioPlay.durChapterPos)
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun upLyricP(position: Int) {
|
override fun upLyricP(position: Int) {
|
||||||
|
/*
|
||||||
lyricViewX.updateTime(position.toLong(), false)
|
lyricViewX.updateTime(position.toLong(), false)
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun addToBookshelf(book: Book, toc: List<BookChapter>) {
|
override fun addToBookshelf(book: Book, toc: List<BookChapter>) {
|
||||||
|
|||||||
@@ -40,11 +40,10 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
app:cardElevation="16dp"
|
app:cardElevation="16dp"
|
||||||
android:layout_marginHorizontal="48dp"
|
android:layout_marginHorizontal="32dp"
|
||||||
android:layout_marginTop="0dp"
|
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
app:layout_constraintDimensionRatio="16:9"
|
app:layout_constraintDimensionRatio="1:1"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/ll_title"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/title_bar"
|
app:layout_constraintTop_toBottomOf="@+id/title_bar"
|
||||||
@@ -124,16 +123,6 @@
|
|||||||
tools:ignore="SmallSp" />
|
tools:ignore="SmallSp" />
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<com.dirror.lyricviewx.LyricViewX
|
|
||||||
android:id="@+id/lyric_view_x"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="0dp"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/player_progress"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/cd_cover"
|
|
||||||
app:lrcCurrentTextColor="?attr/colorPrimary"
|
|
||||||
app:lrcPadding="16dp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/ll_title"
|
android:id="@+id/ll_title"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -152,6 +141,7 @@
|
|||||||
android:scrollbars="none"
|
android:scrollbars="none"
|
||||||
android:textSize="20sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/tv_sub_title"
|
||||||
tools:text="@string/text" />
|
tools:text="@string/text" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -163,10 +153,15 @@
|
|||||||
android:textColor="?attr/colorOnSurfaceVariant"
|
android:textColor="?attr/colorOnSurfaceVariant"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/player_progress"
|
||||||
tools:text="@string/text" />
|
tools:text="@string/text" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_dur_time"
|
android:id="@+id/tv_dur_time"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|||||||
Reference in new issue
Block a user