• Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom List and Wrap Text - HELP  RSS feed

 
Ofer Gurman
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am writing a custom list, however my problem is how I make a long text to be wrap into more then one line instead of getting cut.

I will appreciate any help.
 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hiya,

With MIDP1.0, some phones will wrap the text of List elements automatically, but (as you've seen) some won't. You have no control over it.

But with MIDP2.0, there is a method called setFitPolicy where you can specify wrapping.

Your only real solution to cover all MIDP1.0 phones is to create your own Displayable using the Canvas to create your own type of list where you could set the attributes however you wanted, but this would take quite a lot of code.

Cheers,
James
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Ofer"- Michael has alread asked twice.
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!