Created
August 6, 2010 16:16
-
-
Save shaobin0604/511557 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class LyricView extends View { | |
| private Lyric mLyric; | |
| private Sentence mSentence; | |
| public void update(long time) { | |
| mSentence = mLyric.getSentence(time); | |
| invalidate(); | |
| } | |
| @Override | |
| protected void onDraw(Canvas canvas) { | |
| super.onDraw(canvas); | |
| Log.d(TAG, "in onDraw"); | |
| if (mLyricLoaded) { | |
| drawFocusedLine(canvas); | |
| drawOtherLines(canvas); | |
| } else { | |
| drawErrorMessage(canvas); | |
| } | |
| } | |
| private void drawFocusedLine(Canvas canvas) {...} | |
| private void drawOtherLines(Canvas canvas) {...} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment