0

I have an activity that extends SQLiteOpenHelper and i want to reference a string from resources in my strings.xml

when i use:
Resources res = getResources();
String Note = res.getString(R.string.M1Details);

i get error: The method getResources() is undefined for the type NotesSQL.DbHelper

i have also tried:
String Note = getString(R.string.M1Details);

and i get: The method getString(int) is undefined for the type NotesSQL.DbHelper

i want to know how to properly reference strings from resources xml thanks in advance! :)

Richard Suarez
  • 109
  • 1
  • 10

1 Answers1

0

Here is the same problem. Basically use context.getResource().

Community
  • 1
  • 1
tobi.b
  • 224
  • 2
  • 12