Android Open Source - lyricsplayer.android Lyric Line






From Project

Back to project page lyricsplayer.android.

License

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.

Java Source Code

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);
    }
}




Java Source Code List

com.un4seen.bass.BASS.java
com.un4seen.bass.TAGS.java
hu.mrolcsi.android.filebrowser.BrowserActivity.java
hu.mrolcsi.android.filebrowser.BrowserDialog.java
hu.mrolcsi.android.filebrowser.FileListAdapter.java
hu.mrolcsi.android.filebrowser.Utils.java
hu.mrolcsi.android.lyricsplayer.editor.EditorActivity.java
hu.mrolcsi.android.lyricsplayer.editor.LRCAdapter.java
hu.mrolcsi.android.lyricsplayer.media.LyricLine.java
hu.mrolcsi.android.lyricsplayer.media.Lyrics.java
hu.mrolcsi.android.lyricsplayer.media.OnLyricsReached.java
hu.mrolcsi.android.lyricsplayer.media.Song.java
hu.mrolcsi.android.lyricsplayer.net.LyricsDownloaderTask.java
hu.mrolcsi.android.lyricsplayer.player.PlayerActivity.java