Back to project page lyricsplayer.android.
The source code is released under:
Apache License
If you think the Android project lyricsplayer.android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package hu.mrolcsi.android.lyricsplayer.media; /* www.j av a2s . co m*/ import android.util.Log; import java.util.Comparator; public class LyricLine { public static final Comparator<LyricLine> COMPARATOR = new Comparator<LyricLine>() { @Override public int compare(LyricLine lyricLine, LyricLine lyricLine2) { return (int) (lyricLine.getTime() - lyricLine2.getTime()); } }; private double time; private String lyric; LyricLine(double time, String lyric) { this.time = time; this.lyric = lyric; } @Override public String toString() { return "LyricLine{" + time + ", '" + lyric + '\'' + '}'; } public double getTime() { return time; } public void setTime(double time) { this.time = time; Log.d("LyricsPlayer.LyricsLine", "Time set to = " + time); } public String getLyric() { return lyric; } public void setLyric(String lyric) { this.lyric = lyric; } public String getTimeTag() { int t = (int) (getTime() * 100); int minutes = (t / 6000); t -= minutes * 6000; int seconds = t / 100; t -= seconds * 100; return String.format("[%02d:%02d.%02d]", minutes, seconds, t); } }