ankidroid/Anki-Android — pull request #44 by hssm (2013-04-29 10:02:40+00:00)
Title: Implementation of collection preferences.

[Issue 1687](https://code.google.com/p/ankidroid/issues/detail?id=1687)

Here's an implementation of the collection preferences. See [preferences.py](https://github.com/dae/anki/blob/master/aqt/preferences.py) for reference. I used the same keys in our version.

I also made some small changes in Reviewer.java to actually use some of those preferences correctly. The card adder needs to implement the "When adding, default to..." option, but I left that alone since there's still work being done in that part of the code.

The approach here differs from DeckOptions.java and CramDeckOptions.java where I think the ```DeckPreferenceHack``` class was used to avoid persisting values as Shared Preferences (I could be wrong). In the code here, we're storing and retrieving the values in the collection, but they are also stored as Shared Preferences, even though those values are never used. I couldn't find a way to keep getting the callbacks without leaving persistence on, and to me this seemed much simpler than the DeckPreferenceHack approach, especially with the existing code already there. Hopefully this won't cause problems.