asr-pub / lyricviewdemo Goto Github PK
View Code? Open in Web Editor NEWLyricView is a powerful and flexible custom view to display lyrics within music player under Android
Home Page: https://github.com/zhengken/LyricViewDemo
LyricView is a powerful and flexible custom view to display lyrics within music player under Android
Home Page: https://github.com/zhengken/LyricViewDemo
LyricViewDemo Master\lyricview\src\main\java\me\zhengken\lyricview\LyricView.java
Error:(770, 60) error: cannot find symbol variable index
private long measureStartTimeMillis(String str) { long minute = Long.parseLong(str.substring(1, 3)); long second = Long.parseLong(str.substring(4, 6)); long millisecond = Long.parseLong(str.substring(7, index)); // this index not found return millisecond + second * 1000 + minute * 60 * 1000; }
所以解析时间的时候,正确的时间应该是这个:
LyricView
里的measureStartTimeMillis(String str)
函数:
return millisecond * 10 + second * 1000 + minute * 60 * 1000;
比如网易云很多歌词都是带翻译的。
感谢你的轮子:) 在使用中遇到一个问题,歌词[00:00.00]的解析是写死的,我在解析网易云音乐的歌词的时候部分是[00:00.000]的,解析失败,所以自己down了文件修改的,可以改进一下:0
Error:Could not HEAD 'http://jcenter.bintray.com/com/github/zhengken/LyricViewDemo/v1.2/LyricViewDemo-v1.2.jar'. Received status code 407 from server: authenticationrequired
Enable Gradle 'offline mode' and sync project
Hello can i submit my lyrics here?
我读了一下您的源码,在1个参数的setLyricFile方法里,在设置歌词文件时有用新的歌词文件路径与mCurrentLyricFilePath变量进行比较,如果相同则不继续进行操作,并且在之前如果判断新的文件不存在或为null后在reset后就返回了。那么当我现在已经设置了一个歌词并有效的时候,接下来我设置了一个不存在的歌词文件,则View会reset变为没有歌词的显示状态,然后我又重新设置上一次有效的歌词时,因为mCurrentLyricFilePath没有变化,会导致没法将歌词重新显示出来。2个参数的setLyricFile则没有问题,但是这个没有重新设置歌词和判断编码的功能。
我这边出现过偶现的crash,是因为mLyricInfo.songLines.get(mLineNumberUnderIndicator)出现了角标越界的情况
希望作者在例子中加入歌曲和歌词,是demo可以跑起来看到效果,方便学习,谢谢
看了作者的代码,发现对于[02:04.12][03:37.32][00:59.73]我在这里欢笑
这种形式的歌词解析有误,于是把作者的源码给改了一下
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.