vnshetty
vnshetty

Reputation: 20132

accessing array in android best practice

Which one is the best case scenario here..?

enter image description here

Upvotes: 0

Views: 57

Answers (1)

stinepike
stinepike

Reputation: 54692

From the Ease of understanding and managing the code I think using the resource will be a good option. Also for localization option using resource is the best option.

But using resource is slightly more costly than from getting array from classes in both speed and space. But As i have told that this difference is not that big. So if that small difference still bothers you you can use the option 2.

Personally I am not seeing any big difference between option 3 and option 2.

( I may think in a wrong way, If so hoping correction from experts)

Upvotes: 1

Related Questions