mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-04 21:18:57 +08:00
新增黑、白桌面歌词主题
This commit is contained in:
parent
1289f84985
commit
728e5bad2d
@ -161,7 +161,7 @@ public class LyricView extends Activity implements View.OnTouchListener {
|
|||||||
textView.setAlpha(alpha);
|
textView.setAlpha(alpha);
|
||||||
textView.setTextSize(textSize);
|
textView.setTextSize(textSize);
|
||||||
Log.d("Lyric", "alpha: " + alpha + " text size: " + textSize);
|
Log.d("Lyric", "alpha: " + alpha + " text size: " + textSize);
|
||||||
textView.setShadowLayer(1, 0, 0, Color.BLACK);
|
textView.setShadowLayer(0.3f, 0, 0, Color.BLACK);
|
||||||
textView.setMaxLines(maxLineNum);
|
textView.setMaxLines(maxLineNum);
|
||||||
textView.setEllipsize(TextUtils.TruncateAt.END);
|
textView.setEllipsize(TextUtils.TruncateAt.END);
|
||||||
|
|
||||||
@ -178,7 +178,11 @@ public class LyricView extends Activity implements View.OnTouchListener {
|
|||||||
// ? WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
|
// ? WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
|
||||||
// : WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
// : WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
||||||
if (isLock) {
|
if (isLock) {
|
||||||
layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
|
layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
|
||||||
|
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL |
|
||||||
|
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE |
|
||||||
|
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
|
||||||
|
|
||||||
textView.setBackgroundColor(Color.TRANSPARENT);
|
textView.setBackgroundColor(Color.TRANSPARENT);
|
||||||
|
|
||||||
// 修复 Android 12 的穿透点击问题
|
// 修复 Android 12 的穿透点击问题
|
||||||
@ -186,7 +190,10 @@ public class LyricView extends Activity implements View.OnTouchListener {
|
|||||||
layoutParams.alpha = 0.8f;
|
layoutParams.alpha = 0.8f;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
|
||||||
|
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL |
|
||||||
|
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
|
||||||
|
|
||||||
textView.setBackgroundResource(R.drawable.rounded_corner);
|
textView.setBackgroundResource(R.drawable.rounded_corner);
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R) {
|
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R) {
|
||||||
@ -293,7 +300,11 @@ public class LyricView extends Activity implements View.OnTouchListener {
|
|||||||
public void lockView() {
|
public void lockView() {
|
||||||
isLock = true;
|
isLock = true;
|
||||||
if (windowManager == null || textView == null) return;
|
if (windowManager == null || textView == null) return;
|
||||||
layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE;
|
layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
|
||||||
|
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL |
|
||||||
|
WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE |
|
||||||
|
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R) {
|
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R) {
|
||||||
layoutParams.alpha = 0.8f;
|
layoutParams.alpha = 0.8f;
|
||||||
}
|
}
|
||||||
@ -304,7 +315,10 @@ public class LyricView extends Activity implements View.OnTouchListener {
|
|||||||
public void unlockView() {
|
public void unlockView() {
|
||||||
isLock = false;
|
isLock = false;
|
||||||
if (windowManager == null || textView == null) return;
|
if (windowManager == null || textView == null) return;
|
||||||
layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
|
layoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE |
|
||||||
|
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL |
|
||||||
|
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R) {
|
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R) {
|
||||||
layoutParams.alpha = 1.0f;
|
layoutParams.alpha = 1.0f;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,20 @@
|
|||||||
|
从现在起,有了一个显示状态栏歌词的方式:通过调用第三方Xposed模块【墨•状态栏歌词】的API支持来状态栏歌词(感谢@ftevxk)。
|
||||||
|
但考虑到要依赖第三方应用,并且是Xposed模块,预计用的人会比较少,所以暂不考虑将此特性包含在正式版中,如你满足使用条件并需要此特性,可以看项目的置顶issue
|
||||||
|
|
||||||
### 新增
|
### 新增
|
||||||
|
|
||||||
- 新增设置-播放设置-显示歌词罗马音,默认关闭,注:目前只有网易源能获取到罗马音歌词,如果你知道其他源的歌词罗马音获取方式,欢迎PR!
|
- 新增设置-播放设置-显示歌词罗马音,默认关闭,注:目前只有网易源能获取到罗马音歌词(得益于 Binaryify/NeteaseCloudMusicApi/pull/1523),如果你知道其他源的歌词罗马音获取方式,欢迎PR或开issue交流!
|
||||||
|
- 新增黑、白桌面歌词主题
|
||||||
|
|
||||||
|
### 优化
|
||||||
|
|
||||||
|
- 允许桌面歌词拖动到状态栏上(感谢@ftevxk)
|
||||||
|
- 允许选择更新日志弹窗里的文本内容
|
||||||
|
|
||||||
### 修复
|
### 修复
|
||||||
|
|
||||||
- 修复潜在的桌面歌词导致应用崩溃问题
|
- 修复潜在的桌面歌词导致应用崩溃问题
|
||||||
|
|
||||||
|
### 其他
|
||||||
|
|
||||||
|
- 升级React native到v0.68.2
|
||||||
|
@ -16,7 +16,7 @@ const VersionItem = ({ version, desc }) => {
|
|||||||
return (
|
return (
|
||||||
<View style={{ marginBottom: 10 }}>
|
<View style={{ marginBottom: 10 }}>
|
||||||
<Text style={{ ...styles.label, color: theme.normal, marginBottom: 2 }}>v{version}</Text>
|
<Text style={{ ...styles.label, color: theme.normal, marginBottom: 2 }}>v{version}</Text>
|
||||||
<Text style={{ ...styles.desc, color: theme.normal }}>{desc}</Text>
|
<Text selectable style={{ ...styles.desc, color: theme.normal }}>{desc}</Text>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -182,7 +182,7 @@ const VersionModal = ({ componentId }) => {
|
|||||||
<View>
|
<View>
|
||||||
<Text style={{ ...styles.label, color: theme.normal }}>{t('version_label_change_log')}</Text>
|
<Text style={{ ...styles.label, color: theme.normal }}>{t('version_label_change_log')}</Text>
|
||||||
<View style={{ paddingLeft: 10, marginTop: 5 }}>
|
<View style={{ paddingLeft: 10, marginTop: 5 }}>
|
||||||
<Text style={{ ...styles.desc, color: theme.normal }}>{versionInfo.desc}</Text>
|
<Text selectable style={{ ...styles.desc, color: theme.normal }}>{versionInfo.desc}</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
@ -93,6 +93,7 @@ const styles = StyleSheet.create({
|
|||||||
width: 26,
|
width: 26,
|
||||||
height: 26,
|
height: 26,
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
|
elevation: 1,
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
marginTop: 2,
|
marginTop: 2,
|
||||||
|
@ -64,5 +64,6 @@ const styles = StyleSheet.create({
|
|||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
|
elevation: 1,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -14,6 +14,8 @@ export const themes = [
|
|||||||
{ id: 'purple', value: '#c851d4' },
|
{ id: 'purple', value: '#c851d4' },
|
||||||
{ id: 'orange', value: '#ffad12' },
|
{ id: 'orange', value: '#ffad12' },
|
||||||
{ id: 'grey', value: '#bdc3c7' },
|
{ id: 'grey', value: '#bdc3c7' },
|
||||||
|
{ id: 'black', value: '#333333' },
|
||||||
|
{ id: 'white', value: '#ffffff' },
|
||||||
]
|
]
|
||||||
|
|
||||||
export const textPositionX = [
|
export const textPositionX = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user