[android-developers] Functional retrieval of strings?

2010-03-18 Thread HippoMan
I know that I can retrieve a string within an Activity as follows: this.getString(R.string.foobar) (assuming that I have previously defined a string named foobar). However. I'm wondering if there also might be an alternate way to retrieve this same string in a functional manner, without an

Re: [android-developers] Functional retrieval of strings?

2010-03-18 Thread Mark Murphy
HippoMan wrote: I know that I can retrieve a string within an Activity as follows: this.getString(R.string.foobar) (assuming that I have previously defined a string named foobar). However. I'm wondering if there also might be an alternate way to retrieve this same string in a functional

Re: [android-developers] Functional retrieval of strings?

2010-03-18 Thread TreKing
On Thu, Mar 18, 2010 at 8:49 PM, HippoMan hippo.mail...@gmail.com wrote: The reason I'd like this is so I can avoid compile errors if the string doesn't exist. This would allow me to do something like the following: String foobar = null; try { foobar =