I wish to use some tabspace in a line where I call setText
if(id==R.id.radioButton1){
title.setText(numbertext.getText()+\" Grams\");
If "\t" doesn't work and \u0009 (Unicode for a tab) only shows 1 space:
In values/strings.xml add
<string name="tab">\u0009\u0009\u0009\u0009</string>
Then in your Java file add
textView.setText("text" + getString(R.string.tab) + "moretext");
"\t" works as well, and "\n" is used to start new line
You should add tabulator to the text, but \t don't work in settext. The solution is add the character \u0009
that represents in unicode char the tabulator, in a string resource.
<string name="tab">\u0009</string>
TextView hello = (TextView) findViewById(R.string.helloTextView);
hello.setText("e"+getString(R.string.tab)+"e");
just combine more tab to have more space
getString(R.string.tab)+getString(R.string.tab)+getString(R.string.tab)