From 5e0e18f0879a8c4cfa3b9de080f6eb89b171e968 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 7 Aug 2021 15:16:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=81=E5=B1=8F=E5=90=8E?= =?UTF-8?q?=E6=AD=8C=E8=AF=8D=E8=AE=BE=E7=BD=AE=E8=A2=AB=E8=BF=98=E5=8E=9F?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/lxmusicmobile/lyric/LyricView.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/java/com/lxmusicmobile/lyric/LyricView.java b/android/app/src/main/java/com/lxmusicmobile/lyric/LyricView.java index ab8f200..ed82efb 100644 --- a/android/app/src/main/java/com/lxmusicmobile/lyric/LyricView.java +++ b/android/app/src/main/java/com/lxmusicmobile/lyric/LyricView.java @@ -46,7 +46,7 @@ public class LyricView extends Activity implements View.OnTouchListener { private boolean isLock = false; private String themeColor = "#07c556"; - private String lastText = "LX Music ^-^"; + // private String lastText = "LX Music ^-^"; private String textX = "LEFT"; private String textY = "TOP"; @@ -264,6 +264,7 @@ public class LyricView extends Activity implements View.OnTouchListener { } public void lockView() { + isLock = true; if (windowManager == null || textView == null) return; layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE; textView.setBackgroundColor(Color.TRANSPARENT); @@ -271,6 +272,7 @@ public class LyricView extends Activity implements View.OnTouchListener { } public void unlockView() { + isLock = false; if (windowManager == null || textView == null) return; layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; textView.setBackgroundResource(R.drawable.rounded_corner); @@ -278,12 +280,15 @@ public class LyricView extends Activity implements View.OnTouchListener { } public void setColor(String color) { + themeColor = color; if (windowManager == null || textView == null) return; textView.setTextColor(Color.parseColor(color)); windowManager.updateViewLayout(textView, layoutParams); } public void setLyricTextPosition(String textX, String textY) { + this.textX = textX; + this.textY = textY; if (windowManager == null || textView == null) return; int textPositionX; int textPositionY;