OK, just realized the api provides a settings fragment so rather than re-inventing the wheelI will use it instead.
Yup, same as last commit.