安卓:我该如何处理存储书签? [英] Android: How do I deal with storing Bookmarks?
问题描述
我基本上是用一个ListView,但我看着提供一个书签功能。我在想,书签时,我应该存放物品的属性在一个文件中,并需要填充的ListView书签时检索。
I am essentially using a listview but am looking at providing a bookmark functionality. I am thinking that I should store the item attributes in a file when bookmarked and retrieve when required to populate a bookmark listview.
我还是想知道是否有实现这一使用的事实上的标准做我跟着只是写入文件,从文件中读取必要时的风格?
I was wondering if there is a de facto standard used in achieving this or do I follow just the "writing into a file" and "reading from a file" when necessary style?
推荐答案
而不是纯文本文件(或XML),你可以使用SQLite数据库(Android支持)来存储书签。你会找到的文档 rel=\"nofollow\">。
Instead of plain files (or XML) you could use a SQLite database (android supports that) to store the bookmarks. You'll find the documentation here.
当我开始使用Android玩弄,我用这个教程习惯SQLite的机器人的-Interface。您可能会发现它很有用。
When I started playing around with android, I used this Tutorial to get used to the SQLite-Interface of android. You might find it useful, too.
这篇关于安卓:我该如何处理存储书签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!