3

If I do something like this

someTextView.setText(someString + " and more!");

it warns me "Do not concatenate text displayed with setText. Use resource string with placeholders."

Why does it warn this when string concatenation seems to work just fine?

user7085962
  • 449
  • 1
  • 5
  • 8

2 Answers2

0

It's better to use resource strings thinking about localization

jsiot
  • 126
  • 4
  • 16
0

That is a Lint tool running an inspection for you.

Fabricio
  • 7,705
  • 9
  • 52
  • 87