From 1c757c667d4d827cc0bcf692dae663f7ca49b01c Mon Sep 17 00:00:00 2001
From: Runt <qingingrunt2010@qq.com>
Date: Sun, 01 May 2022 08:51:00 +0000
Subject: [PATCH] 悬浮窗  位置移动

---
 app/src/main/res/layout/float_view.xml |   38 ++++++++++++++++++++++++++++++--------
 1 files changed, 30 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..df671b9 100644
--- a/app/src/main/res/layout/float_view.xml
+++ b/app/src/main/res/layout/float_view.xml
@@ -2,45 +2,67 @@
 <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_constraintRight_toRightOf="parent"/>
 </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file

--
Gitblit v1.9.1