Android Question Display 24 lines of text

canalrun

Well-Known Member
Licensed User
Longtime User
Hello,
I see similar questions have been asked before, but they're all little bit different.

Remember those display terminals that were used with computers that would show 24 lines of text, 80 characters wide, once the screen filled up old text scrolled off the top and new text displayed at the bottom. The console window in Windows is also similar.

I need something like that. With no text wrapping. The number of lines based on the text size and the control height. I'm thinking a multi-line label with an internal List would be the easiest way to do this.

Does anything like this exist? The control needs to be very simple, no editing, no scrolling, just most recent N lines displayed. Is a label with a List a good approach or can someone offer a better idea?

Thanks,
Barry.
 

Straker

Active Member
Licensed User
Longtime User
The list is the easiest way. You can just count the elements (the lines) in your list and when you reach the 24th you just remove the item 0 (the first in the list) and then add the new line.

You can also use an array of labels, but you have to write the code for scrolling the lines.
The list is better. Or I think so.
 
Upvote 0

canalrun

Well-Known Member
Licensed User
Longtime User
Hello,
Here is my solution. A CustomView that implements a terminal window. I've attached the custom view source along with a little test project.

If you find any errors please uploaded and share.

Barry.
 

Attachments

  • twtst.zip
    7.9 KB · Views: 107
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…