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.
我有包含 4000 行的数据库。我想在 android 上用 tableview 显示这些数据。
但设备显示内存警告。
我们可以像在 iPhone 开发中使用的那样重复使用单元吗?
请推荐好方法。这样大容量数据就不会在 android 设备上崩溃。
在表格顶部添加一个搜索字段,仅显示大约 50 个条目。然后,如果用户进一步滚动并达到 <10 个单元格,则您将在表格中附加另外 50 个条目。但是您仍然必须限制总的细胞数。没有身体需要这么多行。如果我在“WhatsApp”中与我的女朋友进行了 6 个月的对话,甚至我的 iPhone 也会崩溃;)
--> 示例:https ://gist.github.com/810391