


we can use string array further in andorid project. This will save a lot of efforts and less line of code. It is best to store this text in string.xml once and call string wherever required. If we write this text 100+ times, it require extra efforts. Our requirement is to write this text 100+ times in any location of the project. In large applications, we use some text many times in our project so rather than define that particular text many times. it is best to store in string.xml file and call it by its string name in project.įor example: Suppose we have a text:- “Hey How are You” Please follow below given path to go on string.xml file. we can assign value to this attribute directly or via string.xml. These views have a common attribute named text. String.xml file present in the values folder which is sub folder of res folder in project structure.In Android Studio, we have many Views such as TextView,Button,EditText,CheckBox,RadioButton etc. String.xml file contains all the strings which will be used frequently in Android project.
