Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why we don't directly assign values for layout views in android? [duplicate]

In creation of UI in android projects ,why we have to refer values of string from the values folder's string.xml?

why eclipse shows warning if we assign values straight away?

I want to know the logic behind this,It's a very basic question but i couldn't find answer for this from google!

like image 924
Mohan Raj Avatar asked Dec 14 '25 05:12

Mohan Raj


1 Answers

Another reason that is not covered in the older post pointed out by KenWolf, is that now when uploading your application to the Google Play Store, you can easily make your app more accessible to other languages/locations by uploading just your strings.xml to their new translation service announced at I/O 2013. This just has to do with localizing your resources like was stated here.

You can read more about it here.

like image 138
TronicZomB Avatar answered Dec 15 '25 22:12

TronicZomB