XML string resources vs Java Constant Strings?

后端 未结 5 1116
佛祖请我去吃肉
佛祖请我去吃肉 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 12:58

    I'd suggest that you leverage the Android resource system.

    To quote the book Android In Practice: Resources in Android are efficient and fast. XML resources are compiled into a binary format. This makes them friendly at development time, without being slow at Runtime.

提交回复
热议问题