Would it be possible to create a TextView in Android that can scroll many lines of text, but will not draw the first or last line of text unless it can be drawn in it’s height completely? I realize that it might look strange when scrolling, but I don’t want to see the cut-off tops or bottoms of characters.
The suggested solution may involve modifying the android platform.
I don’t know what you mean by modifying the android platform, but there is no restriction in coding your own TextView (or extending android TextView to change the scrolling) if you want a completely new behavior.
If you really want to do this, you could change the Touch/Scrolll behavior to directly scroll to the next/previous visible line try changing the TextView Scoller (
setScoller( )method). If that doesn’t work, you will have to code your own (basically getting the line position bytextview.getLayout().getLineTop(line number)and positioning the screen top to that point).The only restriction you have is when you need to change something that is embedded within the “kernel” (like, for example, a media protocol from MediaPlayer).
Check this marquee example