Skip to content

Instantly share code, notes, and snippets.

@jberkel
Created October 14, 2010 15:23
Show Gist options
  • Select an option

  • Save jberkel/626360 to your computer and use it in GitHub Desktop.

Select an option

Save jberkel/626360 to your computer and use it in GitHub Desktop.
Canvas c = null;
try {
c = holder.lockCanvas();
if (c != null && bitmap != null) {
c.drawColor(Color.parseColor("#FF8C4A")); //#FF8C4A FF9933
c.drawBitmap(bitmap, window, dstWindow, mImagePaint);
//It would be great if the text scrolls along the waveform.
//It is necessary a bit of googling
if(mCurrentTrack != null && mCurrentTrack.getUser() != null){
c.drawText((mCurrentTrack.getUser()).getUsername(), mScreenWidth/2, (mScreenHeight/2) - 50, mDefaultPaint);
c.drawText(mCurrentTrack.getTitle(), mScreenWidth/2, (mScreenHeight/2), mDefaultPaint);
}
}
} finally {
if (c != null)
holder.unlockCanvasAndPost(c);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment