Use
Resources.getSystem().getString(android.R.string.someuniversalstuff)
You can use it ABSOLUTELY EVERYWHERE in your application, even in static constants declaration! But for system resources only.
For local resources use that solution.
More Related Contents:
- getString Outside of a Context or Activity
- Using context in a fragment
- Android, getting resource ID from string?
- How to get a resource id with a known resource name?
- How can I get a resource content from a static context?
- How to get a context in a recycler view adapter
- Get application context from non activity singleton class
- How to retrieve a context from a non-activity class?
- How to work with xml and java (android) [closed]
- How can I implement custom Action Bar with custom buttons in Android?
- Set margins in a LinearLayout programmatically
- Secure HTTP Post in Android
- What do I use now that Handler() is deprecated?
- Difference between getExternalFilesDir and getExternalStorageDirectory()
- Android: Pass data(extras) to a fragment
- How do I manage cookies with HttpClient in Android and/or Java?
- Android Resource – Array of Arrays
- Java / Android – How to print out a full stack trace?
- notifyDataSetChanged() makes the list refresh and scroll jumps back to the top
- How to retrieve a list of available/installed fonts in android?
- How can I parse this JSON in Android?
- Open source face recognition for Android [closed]
- Android: Cannot perform this operation because the connection pool has been closed
- How to measure elapsed time
- Bitmap getWidth returns wrong value
- Gson deserialization of List into realmList
- Android – Having Provider authority in the app project
- Read an Image/file from External storage Android
- Android – Access file from assets \ PDF display
- Passing ArrayList of string arrays from one activity to another in android