mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-05-23 22:37:41 +08:00
修复潜在桌面歌词导致的崩溃问题
This commit is contained in:
parent
0e612eee2d
commit
830c84ffc5
@ -120,6 +120,7 @@ public final class LyricSwitchView extends TextSwitcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setAnima() {
|
private void setAnima() {
|
||||||
|
if (textView == null) return;
|
||||||
if (isShowAnima) {
|
if (isShowAnima) {
|
||||||
float size = textView.getTextSize();
|
float size = textView.getTextSize();
|
||||||
setInAnimation(inAnim("top", size));
|
setInAnimation(inAnim("top", size));
|
||||||
@ -141,7 +142,9 @@ public final class LyricSwitchView extends TextSwitcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public TextPaint getPaint() {
|
public TextPaint getPaint() {
|
||||||
return ((TextView)this.getCurrentView()).getPaint();
|
TextView v = (TextView)this.getCurrentView();
|
||||||
|
if (v == null) return null;
|
||||||
|
return v.getPaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setWidth(int i) {
|
public void setWidth(int i) {
|
||||||
|
@ -138,6 +138,7 @@ public class LyricView extends Activity implements View.OnTouchListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void setLayoutParamsHeight() {
|
private void setLayoutParamsHeight() {
|
||||||
|
if (textView == null) return;
|
||||||
int height = textView.getPaint().getFontMetricsInt(null) * maxLineNum;
|
int height = textView.getPaint().getFontMetricsInt(null) * maxLineNum;
|
||||||
if (height > maxHeight - 100) height = maxHeight - 100;
|
if (height > maxHeight - 100) height = maxHeight - 100;
|
||||||
layoutParams.height = height;
|
layoutParams.height = height;
|
||||||
@ -166,7 +167,7 @@ public class LyricView extends Activity implements View.OnTouchListener {
|
|||||||
int width = (int)(maxWidth * widthPercentage);
|
int width = (int)(maxWidth * widthPercentage);
|
||||||
if (layoutParams.width != width) {
|
if (layoutParams.width != width) {
|
||||||
layoutParams.width = width;
|
layoutParams.width = width;
|
||||||
textView.setWidth(width);
|
if (textView != null) textView.setWidth(width);
|
||||||
}
|
}
|
||||||
|
|
||||||
fixViewPosition();
|
fixViewPosition();
|
||||||
@ -382,6 +383,7 @@ public class LyricView extends Activity implements View.OnTouchListener {
|
|||||||
}
|
}
|
||||||
text = textBuilder.toString();
|
text = textBuilder.toString();
|
||||||
}
|
}
|
||||||
|
if (textView == null) return;
|
||||||
textView.setText(text);
|
textView.setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,10 @@
|
|||||||
- 新增重复歌曲列表,可以方便移除我的列表中的重复歌曲,此列表会列出目标列表里歌曲名相同的歌曲,可在“我的列表”里的列表名菜单中使用(注:该功能与PC端的区别是可以点击歌曲名多选删除)
|
- 新增重复歌曲列表,可以方便移除我的列表中的重复歌曲,此列表会列出目标列表里歌曲名相同的歌曲,可在“我的列表”里的列表名菜单中使用(注:该功能与PC端的区别是可以点击歌曲名多选删除)
|
||||||
- 新增打开当前歌曲详情页菜单,可以在歌曲菜单中使用
|
- 新增打开当前歌曲详情页菜单,可以在歌曲菜单中使用
|
||||||
|
|
||||||
|
### 修复
|
||||||
|
|
||||||
|
- 修复潜在桌面歌词导致的崩溃问题
|
||||||
|
|
||||||
### 其他
|
### 其他
|
||||||
|
|
||||||
- 更新 React native 到 v0.73.9
|
- 更新 React native 到 v0.73.9
|
||||||
|
Loading…
x
Reference in New Issue
Block a user