XML string resources vs Java Constant Strings?

后端 未结 5 1096
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-06 12:56

I have a String is like String data="apps";

i know loading String in Android in two ways..

First one is

so it is a constant i def

5条回答
  •  自闭症患者
    2020-12-06 13:16

    You should consider using XML strings as a way to display something to the user and change it depending on locale.

    Never the less, public static final String data="apps"; should be used in order to hide some not-for-user data like db connections, log messages etc.

提交回复
热议问题