From f8a77f6d7ee4e8093525a9c5da4bb80fa41a1e72 Mon Sep 17 00:00:00 2001 From: Ryan Hansberry Date: Thu, 17 Sep 2015 11:48:30 -0700 Subject: Make APIv14 and above use SwitchPreference, and below use custom SwitchCompatPreference. Created API-v14-and-above preferences.xml and host_prefs.xml files (under xml-v14/) in order to do so. This unfortunately for the most part duplicates preferences.xml and host_prefs.xml. This method is an effective workaround for the visual glitch encountered earlier, as recorded here: https://github.com/connectbot/connectbot/pull/205#issuecomment-140547689 --- app/src/main/res/xml-v14/host_prefs.xml | 124 ++++++++++++++++++++ app/src/main/res/xml-v14/preferences.xml | 188 +++++++++++++++++++++++++++++++ app/src/main/res/xml/host_prefs.xml | 27 ++--- app/src/main/res/xml/preferences.xml | 39 +++---- 4 files changed, 333 insertions(+), 45 deletions(-) create mode 100644 app/src/main/res/xml-v14/host_prefs.xml create mode 100644 app/src/main/res/xml-v14/preferences.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/xml-v14/host_prefs.xml b/app/src/main/res/xml-v14/host_prefs.xml new file mode 100644 index 0000000..e0cd4f2 --- /dev/null +++ b/app/src/main/res/xml-v14/host_prefs.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/xml-v14/preferences.xml b/app/src/main/res/xml-v14/preferences.xml new file mode 100644 index 0000000..d04119f --- /dev/null +++ b/app/src/main/res/xml-v14/preferences.xml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/xml/host_prefs.xml b/app/src/main/res/xml/host_prefs.xml index 5e85d60..c21f980 100644 --- a/app/src/main/res/xml/host_prefs.xml +++ b/app/src/main/res/xml/host_prefs.xml @@ -40,13 +40,6 @@ android:singleLine="true" /> - - - - - - - - - + - + - - - - - - - - - - - - -