While I am working with help of tutorial I found this in textview android:text-“@string/hello” it shows some error.
Then I went through graphical view and right click the component and enter the text. Then that error removes and notifies me that
**Hardcoded string hello should use String resources**
In android, “@string/” refer to the string.xml in Project>res>values> location in your package explorer.
String.xml contains a xml file which refer to a string with an id.
Eg:
Here name=”hello” is the id & “Hello World” is its value. When @string/hello is used, the value will be shown.
Similar is the case with “@drawable/”. It will refer to the images used. and many more.
You can set text in text view programmatically. Eg:
I hope it helped you.