Which is best way to define constants in android, either static class, interface or xml resource?

后端 未结 6 1223
独厮守ぢ
独厮守ぢ 2020-12-07 14:28

I\'m developing an android application which uses web service to get data from server, for that I\'m having three different set of URLs to point development system, test ser

6条回答
  •  时光说笑
    2020-12-07 15:10

    In general case:

    • XML values have the advantage of accessbilty in layout file and manifest file over Constants in java file
    • XML values have the advantage for multi language support over Constants in java file

提交回复
热议问题