简体   繁体   中英

Using xml custom file as string.xml

I'm using Android SQLite in my app, I want put all my static query (cration, delete, update) into a specific file (I hate sql merged with java code). so, I want create a file called query.xml and use that as string.xml

context.getString(R.query.MY_STATIC_QUERY)

but I think that is not possible.

there's a method to do that? (or something like that?)

您可以做的一件事..您可以将所有查询放入属性文件,并在需要的地方从属性文件中读取。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM