Android EditText line numbers
<p>I'm making a html IDE and want to add line numbers to an EditText. I tried a think TextView beside the EditText but it has its problems. Any ideas?</p>

<p><strong>EDIT:</strong></p>

<pre><code>private List&lt;String&gt; items = null;
private EditText ideText;
private TextView ln;

     @Override
        public void onCreate(Bundle icicle) {
            super.onCreate(icicle);
            setContentView(R.layout.main);
            ideText = (EditText) findViewById(R.id.ide);
            ln = (TextView) findViewById(R.id.lineNumbers);
            // Create Line Numbers
           for(int i=0;i&lt;ideText.getLineCount();i++){
               ln.append(i +"\n");
           }
        }
</code></pre>
