Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想定义一个包含一些数据的类
Id : Int Value1 : 字符串 Value2 : 字符串
然后我想定义一个该类的数组并在其中存储一些静态数据,我可以使用android中的资源文件来定义这些静态数据吗?
如果可能的话,请告诉我
谢谢
大多数情况下,您只需将此类内容放入 XML 文件(在 res/xml 中)并像普通 XML 文件一样读取它。