I want to know if it is possible to write java code in android XML layout or string values files?
I mean something like this:
<string name="hello">Utilities.doSomething("Hello World, ActMain!")</string>
<string name="app_name">insurance</string>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Running code from strings.xml can be possible in the following way(Not tested,but a high level idea of doing it)
1.Get the string from strings.xml using R.string.* where * is the name of your string.
2.Use any of the expressions evaluation library to run it.
Again this a very high level idea.You will have to figure out how to do that your self.
Check the Jel library for it
Or check this list of evaluation libraries