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.
在我的应用程序中,我有以下数据结构:
整体数据结构主要是包含元素列表的列表。将此数据存储到文件内部存储或 SQLite 的最佳方法是什么?我缺乏这两个方面的经验,并且不确定我需要看哪里。
从开发的角度来看,使用 SQLite 数据库可能会更容易。这使您可以在 ListViews 上使用 CursorAdapters。每个 ListView 都应该有一个表,但应该相当简单。
此外,我认为数据库将比序列化对象或设置文件具有更好的性能。
我认为最好使用 sqlite 数据库,因为您有适当的界面来添加、操作、删除和检索数据。此外,很容易使用 listadapter 为您的 listviews 提供存储在 sqlite 数据库中的数据。