开发者

android- usage of SP

开发者 https://www.devze.com 2023-04-06 19:40 出处:网络
I have doubts regarding the following ones. please clarify it. 1. What is the problem if i set the text of text view in xml file instead of java file(String.xml)?

I have doubts regarding the following ones. please clarify it. 1. What is the problem if i set the text of text view in xml file instead of java file(String.xml)? 2. What is the usage of SP? Give me one example.c开发者_JS百科an anybody helpme.

thanks


Regarding your first question: strings.xml file is used for storing string resources, especially for the sake of resolving the localization issues. You can store multiple strings.xml files inside your project in different folders depending on the localization. This makes translating your application to a different language easier: you just create another strings.xml file, translate all the strings and put it inside the corresponding folder. Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号