I'm subclassing TextView in a class named Message and adding instances of this class into a ListView. The problem is that if the text the user sets on the Message class is too wide, the v开发者_如何学JAVAiew doesn't wrap words as expected.
What should I do?
There are a couple of things I suspect need to be done:
setSingleLinetofalse(sounds like you should do it in the constructor ofMessage).- Make sure the
layout_heightof the widget you're placing in theListViewisWRAP_CONTENT(but not thelayout_width!)
You can also play with setMinLines and setLines if it better suits your needs.
加载中,请稍侯......
精彩评论