开发者

History and bookmark feature in Android application

In my app, I want to add history and add to favorites features. It's an offline app of book details, hence I need to see which book detail was recently viewed a开发者_开发技巧nd save it to database. How to do that?


  1. First of all have a rough estimate of the number of records you want ( history depth, favorites depth ).

  2. How do you plan to reference a detail. Will a detail consist of multiple pages and do you want the addressability ( if there is such a word ) to the page level - OR - do you want to maintain a history of details.

  3. If all you are saving is a DetailID etc, you may even just use SharedPreferences, rather than using the database.

  4. You could use the lifecycle events like onCreate, onResume, onPause etc to track loading / unloading of details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜