【发布时间】:2012-07-25 04:27:26
【问题描述】:
我想在多行 EditText 中显示一个字符串。目前,字符串显示为....
Receive: 0 coin(s) Total
Cost: $100
我希望它显示为...
Receive: 0 coin(s)
Total Cost: $10
这是我的代码,我尝试使用“\n”,但无济于事......
result.setText("Receive:"+ " "+ df.format(rawounces)+"coin(s)" + "\n"
+ "Total Cost:$" + df.format(transactionandpremium*rawounces));
提前谢谢你。
【问题讨论】:
-
继续删除其中任何一个。不要浪费资源。
-
就在 20 分钟前,同一用户提出了相同的问题。你可以编辑同样的问题。为什么你又用不同的标题问了... [应该关闭一个]
标签: android string android-edittext settext