getString() will throw NotFoundException if the resource does not exist.
On Mon, May 18, 2009 at 4:55 AM, aby <orz0...@gmail.com> wrote: > > Hi, > I want to determine a resource string is existing or not. > Because other programs in my system will build this string, > I need to check the string building is success or not. > If fail, I would replace this string as other string. > > For example, if I want to get R.build.buildid > > String updated; > if ( R.build.buildid is exist) > updated = getString(R.build.buildid); > else > updated = getString(R.string.none);//R.string.none exist > > is it possible to check R.build.buildid is existing or not?? > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---