The email application uses the html view ( android.webkit.WebView ) to wrap even text messages in html. Perhaps rendering the code in html and rendering it in a WebView would be a good way to get syntax highlighting.
For line numbering, the thin TextView next to the EditText seems reasonable. You might want to encapsulate it in your own View class, which handles both subheadings - and allows you to turn line numbers on and off (and maybe does other nice things, such as keeping the text size equal)
I think the idea for Android is a good idea. It would be nice to be able to code on a plane without having to use the tray table =)