问题描述
我编程把各种的TextView
s转换为的LinearLayout
与水平方向。
I'm programmatically putting various TextView
s into a LinearLayout
with a horizontal orientation.
研究小时后我无法找出如何告诉机器人不要挤在一条线,而是以浮动不合身的的TextView
一切都在TextViews进入下一行
After 2h of research I couldn't find out how to tell Android not to squeeze all the TextViews in one line but instead to "float" non-fitting TextView
s into the next line.
我知道有没有在的LinearLayout
,但我怎么能告诉的TextView $ C $像实际的线 C> s到实际表现得像从HTML全球浮动的DIV?
I know there isn't something like actual "lines" in a LinearLayout
, but how can I tell the TextView
s to actually behave like floating DIVs from the HTML world?
非常感谢!
推荐答案
这听起来像你正在寻找的东西像一个的FlowLayout在Java中?我发现,在this 这个问题寻找你想要做的事情非常有帮助。
It sounds like you're looking for something like a FlowLayout in Java? I found an answer in this question that looks immensely helpful for what you're trying to do.
这篇关于如何创建"浮动TextViews"在Android的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!