TextView.setHeight(); issues
I'm trying to dynamically change the height of a TextView programmatically in Android/Java and I can seem to get it to work. I have tried invalidating the TV before hand with no luck. If I get the height after I have set it, it returns a value of 0 but still takes up the space on the layout set by the layout_height in the XML c开发者_开发百科ode.
It's some what confusing at first, but Views do not actually get defined a height until they are displayed and drawn on the screen. That's just how Android user interface works. Have you tried textView.getLayoutParams().height = (value here)?
加载中,请稍侯......
精彩评论