{"action":"created","issue":{"url":"https://api.github.com/repos/raatmarien/red-moon/issues/40","repository_url":"https://api.github.com/repos/raatmarien/red-moon","labels_url":"https://api.github.com/repos/raatmarien/red-moon/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/raatmarien/red-moon/issues/40/comments","events_url":"https://api.github.com/repos/raatmarien/red-moon/issues/40/events","html_url":"https://github.com/raatmarien/red-moon/issues/40","id":146636337,"number":40,"title":"[Backend] Update preference implementation","user":{"login":"smichel17","id":6563664,"avatar_url":"https://avatars.githubusercontent.com/u/6563664?v=3","gravatar_id":"","url":"https://api.github.com/users/smichel17","html_url":"https://github.com/smichel17","followers_url":"https://api.github.com/users/smichel17/followers","following_url":"https://api.github.com/users/smichel17/following{/other_user}","gists_url":"https://api.github.com/users/smichel17/gists{/gist_id}","starred_url":"https://api.github.com/users/smichel17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smichel17/subscriptions","organizations_url":"https://api.github.com/users/smichel17/orgs","repos_url":"https://api.github.com/users/smichel17/repos","events_url":"https://api.github.com/users/smichel17/events{/privacy}","received_events_url":"https://api.github.com/users/smichel17/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-07T14:03:04Z","updated_at":"2016-04-07T17:15:55Z","closed_at":null,"body":"There's some duplicate code for changing preferences. I was looking into refactoring this, and came across some information that the approach used right now is deprecated. The [new approach](https://developer.android.com/guide/topics/ui/settings.html) uses an XML file for each fragment, so you can (for example) add `android:dependency=\"mSwitch\"` and the setting will automatically gray out if the main switch is disabled, without needing to write any custom java.\r\n\r\nFWIW, the code is generally really nice. I don't know much Java or Android-specific stuff (but I do know C -- pretty close), and it was very clear what was going on."},"comment":{"url":"https://api.github.com/repos/raatmarien/red-moon/issues/comments/207001521","html_url":"https://github.com/raatmarien/red-moon/issues/40#issuecomment-207001521","issue_url":"https://api.github.com/repos/raatmarien/red-moon/issues/40","id":207001521,"user":{"login":"smichel17","id":6563664,"avatar_url":"https://avatars.githubusercontent.com/u/6563664?v=3","gravatar_id":"","url":"https://api.github.com/users/smichel17","html_url":"https://github.com/smichel17","followers_url":"https://api.github.com/users/smichel17/followers","following_url":"https://api.github.com/users/smichel17/following{/other_user}","gists_url":"https://api.github.com/users/smichel17/gists{/gist_id}","starred_url":"https://api.github.com/users/smichel17/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smichel17/subscriptions","organizations_url":"https://api.github.com/users/smichel17/orgs","repos_url":"https://api.github.com/users/smichel17/repos","events_url":"https://api.github.com/users/smichel17/events{/privacy}","received_events_url":"https://api.github.com/users/smichel17/received_events","type":"User","site_admin":false},"created_at":"2016-04-07T17:15:55Z","updated_at":"2016-04-07T17:15:55Z","body":"I wonder if there's a way to \"cheat\" here. Is it possible to make a \"preference\" that is not actually displayed, that updates (using the old method) whenever the top switch does? (and then make others depend on it)"}}