title: Java - Drawing bitmaps is laggy
body: <p>I am drawing my bitmaps to the screen using canvas and view. When I open up the screen I get a series of lags on the positioning of the image (almost as if I am watching the computer slowly think about where to place the points).</p>
  
  <p>First like this:</p>
  
  <p><img src="https://i.stack.imgur.com/YvvLS.png" alt="enter image description here"></p>
  
  <p>Then:</p>
  
  <p><img src="https://i.stack.imgur.com/GH8mg.png" alt="enter image description here"></p>
  
  <p>And finally:</p>
  
  <p><img src="https://i.stack.imgur.com/JrANN.png" alt="enter image description here"></p>
  
  <p>I understand it's kind of hard with the description I have given but if anyone has any idea could they please tell me!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <pre><code>public class LoseScreen extends View {
  
      @Override protected void onDraw(Canvas canvas) {
  
      paint.setColor(Color.GREEN);
  
      canvas.drawBitmap(box, null, menuBox, null);
  
      menuBox.set(screenWidth / 2 - menuWidth / 2, screenHeight / 2 - menuHeight / 2, menuBox.left + menuWidth, menuBox.top + menuHeight);
      tryagainBounds.set(screenWidth / 2 - tryagainWidth / 2, menuHeight / 2, tryagainBounds.left + tryagainWidth, tryagainBounds.top + tryagainHeight);
  
  
      canvas.drawText("    Score:", 100 * density, menuBox.top + 150 * density, finalScorePaint);
      canvas.drawText(finalScoreString, 225 * density, menuBox.top + 150 * density, finalScorePaint);
  
      canvas.drawText("Highscore:", 100 * density, menuBox.top + 200 * density, finalScorePaint);
      canvas.drawText(HighScore.toString(), 225 * density, menuBox.top + 200 * density, finalScorePaint);
  
      canvas.drawBitmap(tryagain, null, tryagainBounds, null);
  </code></pre>