show vu meter level left to right when horizontal

This commit is contained in:
Ahmet Inan 2015-01-14 22:41:43 +01:00
parent 9ae69a495a
commit 8b3d4bc191

View file

@ -71,7 +71,7 @@ public class VUMeterView extends SurfaceView implements SurfaceHolder.Callback {
if (canvasHeight > canvasWidth)
canvas.drawRect(0, canvasHeight - volume * canvasHeight, canvasWidth, canvasHeight, paint);
else
canvas.drawRect(canvasWidth - volume * canvasWidth, 0, canvasWidth, canvasHeight, paint);
canvas.drawRect(0, 0, volume * canvasWidth, canvasHeight, paint);
} finally {
if (canvas != null)
holder.unlockCanvasAndPost(canvas);