Issue
I'd like to store the generated constants of R.string in a DB.
Are the constants generated (semi-) randomly and can change e.g. between versions? Or are they are built like hashCode
, so their values remain unchanged as long as XML-file <string/>
elements is not touched?
Solution
You shouldn't store R.java
constants in a database, as their values can change when the application is recompiled.
Consider creating a Map<Integer, String>
of some sort instead, where the keys are integer R.string
IDs and the values are String
constants. As long as each String
constant corresponds to a unique R.string
ID and their values never change, you can store them in the database instead.
Answered By - Alex Lockwood
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.