diff options
| -rw-r--r-- | main/res/values/preference_keys.xml | 1 | ||||
| -rw-r--r-- | main/res/values/strings.xml | 3 | ||||
| -rw-r--r-- | main/res/xml/preferences.xml | 10 | ||||
| -rw-r--r-- | main/src/cgeo/geocaching/settings/Settings.java | 6 |
4 files changed, 19 insertions, 1 deletions
diff --git a/main/res/values/preference_keys.xml b/main/res/values/preference_keys.xml index 72d7c61..06fbcbe 100644 --- a/main/res/values/preference_keys.xml +++ b/main/res/values/preference_keys.xml @@ -179,4 +179,5 @@ <string name="pref_appearance">pref_appearance</string> <string name="pref_changelog_last_checksum">changelog_last_checksum</string> <string name="pref_caches_history">caches_history</string> + <string name="pref_hardware_acceleration">hardware_acceleration</string> </resources> diff --git a/main/res/values/strings.xml b/main/res/values/strings.xml index 381e07e..4611811 100644 --- a/main/res/values/strings.xml +++ b/main/res/values/strings.xml @@ -530,6 +530,9 @@ <string name="init_create_memory_dump">Create memory dump</string> <string name="init_memory_dump">Memory dump</string> <string name="init_memory_dumped">Memory dumped to %s</string> + <string name="init_hardware_acceleration_title">Hardware accelerated rendering</string> + <string name="init_hardware_acceleration_note">Hardware acceleration renders graphical elements faster on the screen. However on some devices the Android operating system contains bugs and some text may appear blurred (notably bold characters). Disable hardware acceleration if this happens to you.</string> + <string name="init_hardware_acceleration">Enable hardware acceleration</string> <string name="settings_open_website">Open website</string> <string name="settings_settings">Settings</string> <string name="settings_information">Information</string> diff --git a/main/res/xml/preferences.xml b/main/res/xml/preferences.xml index 6226ebf..59055ca 100644 --- a/main/res/xml/preferences.xml +++ b/main/res/xml/preferences.xml @@ -745,6 +745,16 @@ android:key="@string/pref_fakekey_preference_maintenance_directories" android:title="@string/init_maintenance_directories" /> </PreferenceCategory> + <PreferenceCategory android:title="@string/init_hardware_acceleration_title"> + <cgeo.geocaching.settings.TextPreference + android:layout="@layout/text_preference" + android:text="@string/init_hardware_acceleration_note" /> + + <CheckBoxPreference + android:defaultValue="true" + android:key="@string/pref_hardware_acceleration" + android:title="@string/init_hardware_acceleration" /> + </PreferenceCategory> <PreferenceCategory android:title="@string/init_debug_title" > <cgeo.geocaching.settings.TextPreference android:layout="@layout/text_preference" diff --git a/main/src/cgeo/geocaching/settings/Settings.java b/main/src/cgeo/geocaching/settings/Settings.java index efebadf..16050cb 100644 --- a/main/src/cgeo/geocaching/settings/Settings.java +++ b/main/src/cgeo/geocaching/settings/Settings.java @@ -1036,6 +1036,10 @@ public class Settings { } public static boolean useHardwareAcceleration() { - return true; + return getBoolean(R.string.pref_hardware_acceleration, true); + } + + public static boolean setUseHardwareAcceleration(final boolean useHardwareAcceleration) { + return putBoolean(R.string.pref_hardware_acceleration, useHardwareAcceleration); } } |
