Fix white background on preference dialogs.
Fixes #750 (closed).
So it turns out that the ListPreference
type (i.e. the one used for the "Theme", "Language", "Automatic update interval", etc) is to blame. Found this SO post which pointed to this reddit post which pointed to this class which seems to solve the problem.
The problem is:
- The
ListPreference
class is responsible for creating aDialog
to pop up. - It uses the
android.app.AlertDialog.Builder
, not theandroid.support.v7.AlertDialog.Builder
. - As it doesn't use the support library builder, it doesn't get the support library styles.
- The solution is to use a custom subclass of
ListPreference
which uses the correctAlertDialog.Builder
, and thus it respects out theme choice.
I've included the GPLv3+ licensed AppCompatListPreference
from the QuickLyric project. Unsure whether I need to mention that in the README.md or whether just leaving the license header in that file is enough.
These three commits should also be cherry-picked into stable-v0.102.1
after review.