title: Drawing multiple lines in edittext e.g. notepad
body: <p>I was taking a look at the notepad sample in the android SDK see here: <a href="http://developer.android.com/resources/samples/NotePad/src/com/example/android/notepad/NoteEditor.html">http://developer.android.com/resources/samples/NotePad/src/com/example/android/notepad/NoteEditor.html</a></p>
  
  <p>Thing is it only draws the current line the cursor is on e.g <a href="http://cdn2.staztic.com/screenshots/simple-notepad-app-al-1.jpg">http://cdn2.staztic.com/screenshots/simple-notepad-app-al-1.jpg</a></p>
  
  <p>But I'd like to display lines that fill up the screen e.g. <a href="http://www.itismyworld.info/wp-content/uploads/2010/03/AK-notebook.png">http://www.itismyworld.info/wp-content/uploads/2010/03/AK-notebook.png</a></p>
  
  <p>Any suggestions would be great. The relevent bit of code seems to be here:</p>
  
  <pre><code>    protected void onDraw(Canvas canvas) {
  
          // Gets the number of lines of text in the View.
          int count = getLineCount();
  
          // Gets the global Rect and Paint objects
          Rect r = mRect;
          Paint paint = mPaint;
  
          /*
           * Draws one line in the rectangle for every line of text in the EditText
           */
          for (int i = 0; i &lt; count; i++) {
  
              // Gets the baseline coordinates for the current line of text
              int baseline = getLineBounds(i, r);
  
              /*
               * Draws a line in the background from the left of the rectangle to the right,
               * at a vertical position one dip below the baseline, using the "paint" object
               * for details.
               */
              canvas.drawLine(r.left, baseline + 1, r.right, baseline + 1, paint);
          }
  
          // Finishes up by calling the parent method
          super.onDraw(canvas);
      }
  </code></pre>