【发布时间】:2019-05-14 17:28:48
【问题描述】:
我想在我的文本右侧添加许多空格,以便在 TextView 中打印空格 例如:
String text="text";
TextView=textView=findViewById(R.id.textView);
textView.setText(text+" ");
【问题讨论】:
-
TextView=textView=findViewById(R.id.textView);应该是TextView textView=findViewById(R.id.textView); -
使用填充或边距代替空格
-
为什么需要添加这些额外的空格?
-
您目前的方法有什么问题?为什么不给 TextView 一个合适的宽度?
-
当文本填充到textView时,这个不能加空格
标签: android string user-interface whitespace textview