From 75360a9fa2fcead8b516467d982c5cdf82c63263 Mon Sep 17 00:00:00 2001 From: Runt <qingingrunt2010@qq.com> Date: Sun, 15 May 2022 06:44:38 +0000 Subject: [PATCH] 歌词解析 修复及优化 handler 阻塞问题优化 --- app/src/main/res/layout/float_view.xml | 61 ++++++++++++++++++++++++++---- 1 files changed, 53 insertions(+), 8 deletions(-) diff --git a/app/src/main/res/layout/float_view.xml b/app/src/main/res/layout/float_view.xml index 39a9218..18f7eee 100644 --- a/app/src/main/res/layout/float_view.xml +++ b/app/src/main/res/layout/float_view.xml @@ -2,45 +2,90 @@ <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@color/black_trans" xmlns:app="http://schemas.android.com/apk/res-auto"> - <com.google.android.material.floatingactionbutton.FloatingActionButton + <ImageButton android:id="@+id/floating" android:layout_width="40dp" android:layout_height="wrap_content" android:alpha="0.9" + android:src="@android:drawable/ic_notification_overlay" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintLeft_toLeftOf="parent" /> + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintBottom_toTopOf="@id/lyric"/> + <ImageButton + android:id="@+id/close" + android:layout_width="40dp" + android:layout_height="wrap_content" + android:alpha="0.9" + android:src="@android:drawable/ic_menu_close_clear_cancel" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintBottom_toTopOf="@id/lyric"/> + <com.auto.lyric.widgets.LyricView + android:id="@+id/lyric" + android:layout_width="match_parent" + android:layout_height="0dp" + android:text="歌词大意" + android:gravity="center" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toBottomOf="@id/close" + app:layout_constraintBottom_toTopOf="@id/btn_back"/> - <com.google.android.material.button.MaterialButton + <Button android:id="@+id/btn_back" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="后退" android:textColor="@color/black" - android:alpha="0.2" + app:layout_constraintTop_toBottomOf="@id/lyric" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent"/> - <com.google.android.material.button.MaterialButton + <Button android:id="@+id/btn_pause" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="暂停" android:textColor="@color/black" - android:alpha="0.2" + app:layout_constraintTop_toBottomOf="@id/lyric" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toRightOf="@id/btn_back" app:layout_constraintRight_toLeftOf="@id/btn_fast"/> - <com.google.android.material.button.MaterialButton + <Button android:id="@+id/btn_fast" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="快进" android:textColor="@color/black" - android:alpha="0.2" + app:layout_constraintTop_toBottomOf="@id/lyric" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toRightOf="@id/btn_pause" + app:layout_constraintRight_toLeftOf="@id/btn_start" /> + + <Button + android:id="@+id/btn_start" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="开启" + android:textColor="@color/black" + app:layout_constraintTop_toBottomOf="@id/lyric" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintRight_toRightOf="parent"/> + + <TextView + android:id="@+id/timer" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/white" + android:text="0.000" + android:textSize="15sp" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + android:layout_marginTop="10dp" + app:layout_constraintTop_toTopOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file -- Gitblit v1.9.1