我有一个TextView,它有10行作为属性和两个变量,即Alpha和Beta。
我希望Alpha使用TextView的前两行,Beta使用其余的行或3-10行。
如何编写我的Java代码?我找不到直接寻址Lines集合的方法。
这不起作用:
TextView.setText.Lines[1]("This is a test\n for Alpha");
TextView.setText.Lines[3]("This is a test\n for Beta\n that has more lines\n than Alpha");TiA树
发布于 2013-06-23 05:33:49
您不能这样做,线条取决于TextView的宽度。如果您愿意,可以使用两个TextViews,一个包含2行代码,另一个包含8行代码。
https://stackoverflow.com/questions/17255390
复制相似问题