Split preferences into multiple screens; add about page
This commit is contained in:
parent
0965430b64
commit
e6d74b6a1b
@ -125,6 +125,13 @@ THE SOFTWARE.
|
||||
<activity
|
||||
android:name="PreferencesActivity"
|
||||
android:theme="@style/BackActionBar" />
|
||||
<activity android:name="PreferencesActivity$AudioActivity" />
|
||||
<activity android:name="PreferencesActivity$PlaybackActivity" />
|
||||
<activity android:name="PreferencesActivity$LibraryActivity" />
|
||||
<activity android:name="PreferencesActivity$NotificationsActivity" />
|
||||
<activity android:name="PreferencesActivity$ShakeActivity" />
|
||||
<activity android:name="PreferencesActivity$MiscActivity" />
|
||||
<activity android:name="PreferencesActivity$AboutActivity" />
|
||||
<activity
|
||||
android:name="TabOrderActivity"
|
||||
android:theme="@style/BackActionBar" />
|
||||
|
60
assets/about.html
Normal file
60
assets/about.html
Normal file
@ -0,0 +1,60 @@
|
||||
<html>
|
||||
<head>
|
||||
<style>
|
||||
body { font-family: sans-serif; color: #f3f3f3; background: transparent;}
|
||||
pre { background-color: #ccc; color: #000; padding: 1em; white-space: pre-wrap; display: none; }
|
||||
h2 { border-bottom: 1px solid #444; }
|
||||
a { color: #5c5cff; }
|
||||
</style>
|
||||
<script>
|
||||
function show(n) {
|
||||
var e = document.getElementById(n);
|
||||
if (e.style.display == "block") {
|
||||
e.style.display="none";
|
||||
} else {
|
||||
e.style.display="block";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Vanilla Music</h1>
|
||||
<p><b>Version:</b> 0.9.10 (65db705baa3a) released March 14, 2012<br><br>
|
||||
<b>Website:</b> <a href='https://github.com/kreed/vanilla'>https://github.com/kreed/vanilla</a><br>
|
||||
<b>Issue tracker:</b> <a href='https://github.com/kreed/vanilla/issues'>https://github.com/kreed/vanilla/issues</a><br>
|
||||
<b>Help translate:</b> <a href='http://crowdin.net/project/vanilla-music/invite'>http://crowdin.net/project/vanilla-music</a></p>
|
||||
<h2>Contributors</h2>
|
||||
<ul>
|
||||
<li>Chris Eby (creator)</li>
|
||||
<li>David Beswick (various contributions)</li>
|
||||
<li>Ferenc Nagy (icon)</li>
|
||||
<li>Jean-Baptiste Lab (notication color invert)</li>
|
||||
<li>Jean-François Im (cover art loading)</li>
|
||||
<li>Magnus Anderssen (headset button)</li>
|
||||
<li>Mildred Ki'Lya (stop after track mode)</li>
|
||||
<!-- TODO: add translators -->
|
||||
</ul>
|
||||
<h2>Licenses</h2>
|
||||
<h3>Vanilla Music [<a href='javascript:show("l1")'>show</a>]</h3>
|
||||
<pre id='l1'>
|
||||
Copyright (C) 2012 Vanilla Music contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
</pre>
|
||||
<h3>ViewPageIndicator [<a href='javascript:show("l2")'>show</a>]</h3>
|
||||
<pre id='l2'>
|
||||
Copyright (C) 2011 The Android Open Source Project
|
||||
Copyright (C) 2011 Jake Wharton
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
@ -137,7 +137,7 @@ THE SOFTWARE.
|
||||
<item quantity="other">%d hours</item>
|
||||
</plurals>
|
||||
|
||||
<string name="pref_output">Audio Output</string>
|
||||
<string name="audio">Audio</string>
|
||||
<string name="volume_title">Volume</string>
|
||||
<string name="media_button_title">Headset/Bluetooth Controls</string>
|
||||
<string name="media_button_summary">This is also required for ICS lockscreen controls.</string>
|
||||
@ -148,13 +148,13 @@ THE SOFTWARE.
|
||||
<string name="headset_play_title">Play When Plugged</string>
|
||||
<string name="headset_play_summary">Play when the headphones are plugged in. (Only works when the service is running.)</string>
|
||||
|
||||
<string name="pref_notifications">Notifications</string>
|
||||
<string name="notifications">Notifications</string>
|
||||
<string name="notification_mode_title">Notification Mode</string>
|
||||
<string name="notification_action_title">Notification Action</string>
|
||||
<string name="notification_invert_color_title">Invert Notification Color</string>
|
||||
<string name="notification_invert_color_summary">Use white text instead of black text</string>
|
||||
|
||||
<string name="pref_playback_view">Playback View</string>
|
||||
<string name="playback_screen">Playback Screen</string>
|
||||
<string name="playback_on_startup_title">Open on Startup</string>
|
||||
<string name="playback_on_startup_summary">Open playback view on startup</string>
|
||||
<string name="display_mode_title">Display Mode</string>
|
||||
@ -163,19 +163,19 @@ THE SOFTWARE.
|
||||
<string name="cover_press_action_title">Cover Tap Action</string>
|
||||
<string name="cover_longpress_action_title">Cover Long Press Action</string>
|
||||
|
||||
<string name="pref_song_selector">Library View</string>
|
||||
<string name="library_screen">Library Screen</string>
|
||||
<string name="controls_in_selector_title">Controls in Library</string>
|
||||
<string name="controls_in_selector_summary">Show the currently playing song and media controls in the library view</string>
|
||||
<string name="default_action_title">Default Action</string>
|
||||
<string name="default_playlist_action_title">Default Playlist Action</string>
|
||||
|
||||
<string name="pref_shake">Accelerometer Shake</string>
|
||||
<string name="accelerometer_shake">Accelerometer Shake</string>
|
||||
<string name="enable_shake_title">Enable Accelerometer Shake</string>
|
||||
<string name="enable_shake_summary">Only active when music is playing. Does not work when screen is off on some devices.</string>
|
||||
<string name="shake_action_title">Shake Action</string>
|
||||
<string name="shake_threshold_title">Shake Force Threshold</string>
|
||||
|
||||
<string name="pref_misc">Miscellaneous Features</string>
|
||||
<string name="misc_features">Miscellaneous Features</string>
|
||||
<string name="disable_lockscreen_title">Disable Lockscreen</string>
|
||||
<string name="disable_lockscreen_summary">Prevent the lockscreen from activating when in the library or playback screen</string>
|
||||
<string name="use_idle_timeout_title">Enable Idle Timeout</string>
|
||||
@ -195,6 +195,8 @@ THE SOFTWARE.
|
||||
<string name="scan_in_progress">Scan in progress…</string>
|
||||
<string name="finished_scanning">Finished scanning. Tap to scan again.</string>
|
||||
|
||||
<string name="about">About</string>
|
||||
|
||||
<string name="tabs">Tab Order</string>
|
||||
<string name="customize_tab_order">Adjust the order and visibility of library tabs</string>
|
||||
<string name="restore_default">Restore default</string>
|
||||
|
52
res/xml/preference_audio.xml
Normal file
52
res/xml/preference_audio.xml
Normal file
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright (C) 2012 Christopher Eby <kreed@kreed.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:persistent="true">
|
||||
<org.kreed.vanilla.SeekBarPreference
|
||||
android:key="volume_int"
|
||||
android:negativeButtonText="@null"
|
||||
android:dialogLayout="@layout/shake_pref"
|
||||
android:defaultValue="100"
|
||||
android:title="@string/volume_title" />
|
||||
<CheckBoxPreference
|
||||
android:key="media_button"
|
||||
android:title="@string/media_button_title"
|
||||
android:summary="@string/media_button_summary"
|
||||
android:defaultValue="true" />
|
||||
<CheckBoxPreference
|
||||
android:key="headset_only"
|
||||
android:title="@string/headset_only_title"
|
||||
android:defaultValue="false"
|
||||
android:summary="@string/headset_only_summary" />
|
||||
<CheckBoxPreference
|
||||
android:key="headset_pause"
|
||||
android:title="@string/headset_pause_title"
|
||||
android:defaultValue="true"
|
||||
android:summary="@string/headset_pause_summary" />
|
||||
<CheckBoxPreference
|
||||
android:key="headset_play"
|
||||
android:title="@string/headset_play_title"
|
||||
android:summary="@string/headset_play_summary"
|
||||
android:defaultValue="false" />
|
||||
</PreferenceScreen>
|
45
res/xml/preference_headers.xml
Normal file
45
res/xml/preference_headers.xml
Normal file
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright (C) 2010, 2011 Christopher Eby <kreed@kreed.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
<preference-headers xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<header
|
||||
android:fragment="org.kreed.vanilla.PreferencesActivity$AudioFragment"
|
||||
android:title="@string/audio" />
|
||||
<header
|
||||
android:fragment="org.kreed.vanilla.PreferencesActivity$PlaybackFragment"
|
||||
android:title="@string/playback_screen" />
|
||||
<header
|
||||
android:fragment="org.kreed.vanilla.PreferencesActivity$LibraryFragment"
|
||||
android:title="@string/library_screen" />
|
||||
<header
|
||||
android:fragment="org.kreed.vanilla.PreferencesActivity$NotificationsFragment"
|
||||
android:title="@string/notifications" />
|
||||
<header
|
||||
android:fragment="org.kreed.vanilla.PreferencesActivity$ShakeFragment"
|
||||
android:title="@string/accelerometer_shake" />
|
||||
<header
|
||||
android:fragment="org.kreed.vanilla.PreferencesActivity$MiscFragment"
|
||||
android:title="@string/misc_features" />
|
||||
<header
|
||||
android:fragment="org.kreed.vanilla.PreferencesActivity$AboutFragment"
|
||||
android:title="@string/about" />
|
||||
</preference-headers>
|
50
res/xml/preference_library.xml
Normal file
50
res/xml/preference_library.xml
Normal file
@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright (C) 2012 Christopher Eby <kreed@kreed.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:persistent="true">
|
||||
<CheckBoxPreference
|
||||
android:key="controls_in_selector"
|
||||
android:title="@string/controls_in_selector_title"
|
||||
android:summary="@string/controls_in_selector_summary"
|
||||
android:defaultValue="false" />
|
||||
<PreferenceScreen
|
||||
android:title="@string/tabs"
|
||||
android:summary="@string/customize_tab_order">
|
||||
<intent
|
||||
android:targetPackage="org.kreed.vanilla"
|
||||
android:targetClass="org.kreed.vanilla.TabOrderActivity" />
|
||||
</PreferenceScreen>
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="default_action_int"
|
||||
android:title="@string/default_action_title"
|
||||
android:entries="@array/default_action_entries"
|
||||
android:entryValues="@array/entry_values"
|
||||
android:defaultValue="0" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="default_playlist_action"
|
||||
android:title="@string/default_playlist_action_title"
|
||||
android:entries="@array/default_playlist_action_entries"
|
||||
android:entryValues="@array/entry_values"
|
||||
android:defaultValue="3" />
|
||||
</PreferenceScreen>
|
61
res/xml/preference_misc.xml
Normal file
61
res/xml/preference_misc.xml
Normal file
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright (C) 2012 Christopher Eby <kreed@kreed.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:persistent="true">
|
||||
<CheckBoxPreference
|
||||
android:key="disable_lockscreen"
|
||||
android:title="@string/disable_lockscreen_title"
|
||||
android:summary="@string/disable_lockscreen_summary"
|
||||
android:defaultValue="false" />
|
||||
<CheckBoxPreference
|
||||
android:key="use_idle_timeout"
|
||||
android:title="@string/use_idle_timeout_title"
|
||||
android:summary="@string/use_idle_timeout_summary"
|
||||
android:defaultValue="false" />
|
||||
<org.kreed.vanilla.IdlePreference
|
||||
android:key="idle_timeout"
|
||||
android:title="@string/idle_timeout_title"
|
||||
android:dependency="use_idle_timeout" />
|
||||
<CheckBoxPreference
|
||||
android:key="disable_cover_art"
|
||||
android:title="@string/disable_cover_art_title"
|
||||
android:summary="@string/disable_cover_art_summary"
|
||||
android:defaultValue="false" />
|
||||
<CheckBoxPreference
|
||||
android:key="double_tap"
|
||||
android:title="@string/double_tap_title"
|
||||
android:summary="@string/double_tap_summary"
|
||||
android:defaultValue="false" />
|
||||
<CheckBoxPreference
|
||||
android:key="scrobble"
|
||||
android:title="@string/scrobble_title"
|
||||
android:defaultValue="true"
|
||||
android:summary="@string/scrobble_summary" />
|
||||
<CheckBoxPreference
|
||||
android:key="stock_broadcast"
|
||||
android:title="@string/stock_broadcast_title"
|
||||
android:summary="@string/stock_broadcast_summary"
|
||||
android:defaultValue="false" />
|
||||
<org.kreed.vanilla.ScanPreference />
|
||||
</PreferenceScreen>
|
43
res/xml/preference_notifications.xml
Normal file
43
res/xml/preference_notifications.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright (C) 2012 Christopher Eby <kreed@kreed.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:persistent="true">
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="notification_mode"
|
||||
android:title="@string/notification_mode_title"
|
||||
android:entries="@array/notification_mode_entries"
|
||||
android:entryValues="@array/entry_values"
|
||||
android:defaultValue="1" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="notification_action"
|
||||
android:title="@string/notification_action_title"
|
||||
android:entries="@array/notification_action_entries"
|
||||
android:entryValues="@array/entry_values"
|
||||
android:defaultValue="0" />
|
||||
<CheckBoxPreference
|
||||
android:key="notification_inverted_color"
|
||||
android:title="@string/notification_invert_color_title"
|
||||
android:summary="@string/notification_invert_color_summary"
|
||||
android:defaultValue="false" />
|
||||
</PreferenceScreen>
|
61
res/xml/preference_playback.xml
Normal file
61
res/xml/preference_playback.xml
Normal file
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright (C) 2012 Christopher Eby <kreed@kreed.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:persistent="true">
|
||||
<CheckBoxPreference
|
||||
android:key="playback_on_startup"
|
||||
android:title="@string/playback_on_startup_title"
|
||||
android:summary="@string/playback_on_startup_summary"
|
||||
android:defaultValue="false" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="display_mode"
|
||||
android:title="@string/display_mode_title"
|
||||
android:entries="@array/display_mode_entries"
|
||||
android:entryValues="@array/entry_values"
|
||||
android:defaultValue="2" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="swipe_up_action"
|
||||
android:title="@string/swipe_up_action_title"
|
||||
android:entries="@array/swipe_action_entries"
|
||||
android:entryValues="@array/swipe_action_values"
|
||||
android:defaultValue="Nothing" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="swipe_down_action"
|
||||
android:title="@string/swipe_down_action_title"
|
||||
android:entries="@array/swipe_action_entries"
|
||||
android:entryValues="@array/swipe_action_values"
|
||||
android:defaultValue="Nothing" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="cover_press_action"
|
||||
android:title="@string/cover_press_action_title"
|
||||
android:entries="@array/swipe_action_entries"
|
||||
android:entryValues="@array/swipe_action_values"
|
||||
android:defaultValue="ToggleControls" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="cover_longpress_action"
|
||||
android:title="@string/cover_longpress_action_title"
|
||||
android:entries="@array/swipe_action_entries"
|
||||
android:entryValues="@array/swipe_action_values"
|
||||
android:defaultValue="PlayPause" />
|
||||
</PreferenceScreen>
|
46
res/xml/preference_shake.xml
Normal file
46
res/xml/preference_shake.xml
Normal file
@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright (C) 2012 Christopher Eby <kreed@kreed.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:persistent="true">
|
||||
<CheckBoxPreference
|
||||
android:key="enable_shake"
|
||||
android:title="@string/enable_shake_title"
|
||||
android:summary="@string/enable_shake_summary"
|
||||
android:defaultValue="false" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="shake_action"
|
||||
android:title="@string/shake_action_title"
|
||||
android:entries="@array/swipe_action_entries"
|
||||
android:entryValues="@array/swipe_action_values"
|
||||
android:defaultValue="NextSong"
|
||||
android:dependency="enable_shake" />
|
||||
<!-- Might be nice to show something indicating the current shake force for this preference. -->
|
||||
<org.kreed.vanilla.SeekBarPreference
|
||||
android:key="shake_threshold"
|
||||
android:negativeButtonText="@null"
|
||||
android:dialogLayout="@layout/shake_pref"
|
||||
android:title="@string/shake_threshold_title"
|
||||
android:defaultValue="80"
|
||||
android:dependency="enable_shake" />
|
||||
</PreferenceScreen>
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!--
|
||||
Copyright (C) 2010, 2011 Christopher Eby <kreed@kreed.org>
|
||||
Copyright (C) 2012 Christopher Eby <kreed@kreed.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
@ -20,170 +20,47 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
-->
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:persistent="true">
|
||||
<PreferenceCategory android:title="@string/pref_output">
|
||||
<org.kreed.vanilla.SeekBarPreference
|
||||
android:key="volume_int"
|
||||
android:negativeButtonText="@null"
|
||||
android:dialogLayout="@layout/shake_pref"
|
||||
android:defaultValue="100"
|
||||
android:title="@string/volume_title" />
|
||||
<CheckBoxPreference
|
||||
android:key="media_button"
|
||||
android:title="@string/media_button_title"
|
||||
android:summary="@string/media_button_summary"
|
||||
android:defaultValue="true" />
|
||||
<CheckBoxPreference
|
||||
android:key="headset_only"
|
||||
android:title="@string/headset_only_title"
|
||||
android:defaultValue="false"
|
||||
android:summary="@string/headset_only_summary" />
|
||||
<CheckBoxPreference
|
||||
android:key="headset_pause"
|
||||
android:title="@string/headset_pause_title"
|
||||
android:defaultValue="true"
|
||||
android:summary="@string/headset_pause_summary" />
|
||||
<CheckBoxPreference
|
||||
android:key="headset_play"
|
||||
android:title="@string/headset_play_title"
|
||||
android:summary="@string/headset_play_summary"
|
||||
android:defaultValue="false" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/pref_notifications">
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="notification_mode"
|
||||
android:title="@string/notification_mode_title"
|
||||
android:entries="@array/notification_mode_entries"
|
||||
android:entryValues="@array/entry_values"
|
||||
android:defaultValue="1" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="notification_action"
|
||||
android:title="@string/notification_action_title"
|
||||
android:entries="@array/notification_action_entries"
|
||||
android:entryValues="@array/entry_values"
|
||||
android:defaultValue="0" />
|
||||
<CheckBoxPreference
|
||||
android:key="notification_inverted_color"
|
||||
android:title="@string/notification_invert_color_title"
|
||||
android:summary="@string/notification_invert_color_summary"
|
||||
android:defaultValue="false" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/pref_playback_view">
|
||||
<CheckBoxPreference
|
||||
android:key="playback_on_startup"
|
||||
android:title="@string/playback_on_startup_title"
|
||||
android:summary="@string/playback_on_startup_summary"
|
||||
android:defaultValue="false" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="display_mode"
|
||||
android:title="@string/display_mode_title"
|
||||
android:entries="@array/display_mode_entries"
|
||||
android:entryValues="@array/entry_values"
|
||||
android:defaultValue="2" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="swipe_up_action"
|
||||
android:title="@string/swipe_up_action_title"
|
||||
android:entries="@array/swipe_action_entries"
|
||||
android:entryValues="@array/swipe_action_values"
|
||||
android:defaultValue="Nothing" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="swipe_down_action"
|
||||
android:title="@string/swipe_down_action_title"
|
||||
android:entries="@array/swipe_action_entries"
|
||||
android:entryValues="@array/swipe_action_values"
|
||||
android:defaultValue="Nothing" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="cover_press_action"
|
||||
android:title="@string/cover_press_action_title"
|
||||
android:entries="@array/swipe_action_entries"
|
||||
android:entryValues="@array/swipe_action_values"
|
||||
android:defaultValue="ToggleControls" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="cover_longpress_action"
|
||||
android:title="@string/cover_longpress_action_title"
|
||||
android:entries="@array/swipe_action_entries"
|
||||
android:entryValues="@array/swipe_action_values"
|
||||
android:defaultValue="PlayPause" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:key="library" android:title="@string/pref_song_selector">
|
||||
<CheckBoxPreference
|
||||
android:key="controls_in_selector"
|
||||
android:title="@string/controls_in_selector_title"
|
||||
android:summary="@string/controls_in_selector_summary"
|
||||
android:defaultValue="false" />
|
||||
<org.kreed.vanilla.TabOrderPreference />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="default_action_int"
|
||||
android:title="@string/default_action_title"
|
||||
android:entries="@array/default_action_entries"
|
||||
android:entryValues="@array/entry_values"
|
||||
android:defaultValue="0" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="default_playlist_action"
|
||||
android:title="@string/default_playlist_action_title"
|
||||
android:entries="@array/default_playlist_action_entries"
|
||||
android:entryValues="@array/entry_values"
|
||||
android:defaultValue="3" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/pref_shake">
|
||||
<CheckBoxPreference
|
||||
android:key="enable_shake"
|
||||
android:title="@string/enable_shake_title"
|
||||
android:summary="@string/enable_shake_summary"
|
||||
android:defaultValue="false" />
|
||||
<org.kreed.vanilla.ListPreferenceSummary
|
||||
android:key="shake_action"
|
||||
android:title="@string/shake_action_title"
|
||||
android:entries="@array/swipe_action_entries"
|
||||
android:entryValues="@array/swipe_action_values"
|
||||
android:defaultValue="NextSong"
|
||||
android:dependency="enable_shake" />
|
||||
<!-- Might be nice to show something indicating the current shake force for this preference. -->
|
||||
<org.kreed.vanilla.SeekBarPreference
|
||||
android:key="shake_threshold"
|
||||
android:negativeButtonText="@null"
|
||||
android:dialogLayout="@layout/shake_pref"
|
||||
android:title="@string/shake_threshold_title"
|
||||
android:defaultValue="80"
|
||||
android:dependency="enable_shake" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/pref_misc">
|
||||
<CheckBoxPreference
|
||||
android:key="disable_lockscreen"
|
||||
android:title="@string/disable_lockscreen_title"
|
||||
android:summary="@string/disable_lockscreen_summary"
|
||||
android:defaultValue="false" />
|
||||
<CheckBoxPreference
|
||||
android:key="use_idle_timeout"
|
||||
android:title="@string/use_idle_timeout_title"
|
||||
android:summary="@string/use_idle_timeout_summary"
|
||||
android:defaultValue="false" />
|
||||
<org.kreed.vanilla.IdlePreference
|
||||
android:key="idle_timeout"
|
||||
android:title="@string/idle_timeout_title"
|
||||
android:dependency="use_idle_timeout" />
|
||||
<CheckBoxPreference
|
||||
android:key="disable_cover_art"
|
||||
android:title="@string/disable_cover_art_title"
|
||||
android:summary="@string/disable_cover_art_summary"
|
||||
android:defaultValue="false" />
|
||||
<CheckBoxPreference
|
||||
android:key="double_tap"
|
||||
android:title="@string/double_tap_title"
|
||||
android:summary="@string/double_tap_summary"
|
||||
android:defaultValue="false" />
|
||||
<CheckBoxPreference
|
||||
android:key="scrobble"
|
||||
android:title="@string/scrobble_title"
|
||||
android:defaultValue="true"
|
||||
android:summary="@string/scrobble_summary" />
|
||||
<CheckBoxPreference
|
||||
android:key="stock_broadcast"
|
||||
android:title="@string/stock_broadcast_title"
|
||||
android:summary="@string/stock_broadcast_summary"
|
||||
android:defaultValue="false" />
|
||||
<org.kreed.vanilla.ScanPreference />
|
||||
</PreferenceCategory>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceScreen
|
||||
android:title="@string/audio">
|
||||
<intent
|
||||
android:targetPackage="org.kreed.vanilla"
|
||||
android:targetClass="org.kreed.vanilla.PreferencesActivity$AudioActivity" />
|
||||
</PreferenceScreen>
|
||||
<PreferenceScreen
|
||||
android:title="@string/playback_screen">
|
||||
<intent
|
||||
android:targetPackage="org.kreed.vanilla"
|
||||
android:targetClass="org.kreed.vanilla.PreferencesActivity$PlaybackActivity" />
|
||||
</PreferenceScreen>
|
||||
<PreferenceScreen
|
||||
android:title="@string/library_screen">
|
||||
<intent
|
||||
android:targetPackage="org.kreed.vanilla"
|
||||
android:targetClass="org.kreed.vanilla.PreferencesActivity$LibraryActivity" />
|
||||
</PreferenceScreen>
|
||||
<PreferenceScreen
|
||||
android:title="@string/notifications">
|
||||
<intent
|
||||
android:targetPackage="org.kreed.vanilla"
|
||||
android:targetClass="org.kreed.vanilla.PreferencesActivity$NotificationsActivity" />
|
||||
</PreferenceScreen>
|
||||
<PreferenceScreen
|
||||
android:title="@string/accelerometer_shake">
|
||||
<intent
|
||||
android:targetPackage="org.kreed.vanilla"
|
||||
android:targetClass="org.kreed.vanilla.PreferencesActivity$ShakeActivity" />
|
||||
</PreferenceScreen>
|
||||
<PreferenceScreen
|
||||
android:title="@string/misc_features">
|
||||
<intent
|
||||
android:targetPackage="org.kreed.vanilla"
|
||||
android:targetClass="org.kreed.vanilla.PreferencesActivity$MiscActivity" />
|
||||
</PreferenceScreen>
|
||||
<PreferenceScreen
|
||||
android:title="@string/about">
|
||||
<intent
|
||||
android:targetPackage="org.kreed.vanilla"
|
||||
android:targetClass="org.kreed.vanilla.PreferencesActivity$AboutActivity" />
|
||||
</PreferenceScreen>
|
||||
</PreferenceScreen>
|
||||
|
@ -22,11 +22,21 @@
|
||||
|
||||
package org.kreed.vanilla;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.app.Activity;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
import android.preference.PreferenceFragment;
|
||||
import android.preference.PreferenceGroup;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewFragment;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The preferences activity in which one can change application preferences.
|
||||
@ -35,18 +45,23 @@ public class PreferencesActivity extends PreferenceActivity {
|
||||
/**
|
||||
* Initialize the activity, loading the preference specifications.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preferences);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
|
||||
PreferenceGroup library = (PreferenceGroup)findPreference("library");
|
||||
library.removePreference(findPreference("controls_in_selector"));
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
|
||||
addPreferencesFromResource(R.xml.preferences);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(11)
|
||||
@Override
|
||||
public void onBuildHeaders(List<Header> target)
|
||||
{
|
||||
loadHeadersFromResource(R.xml.preference_headers, target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item)
|
||||
{
|
||||
@ -57,4 +72,154 @@ public class PreferencesActivity extends PreferenceActivity {
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
}
|
||||
|
||||
public static class AudioActivity extends PreferenceActivity {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preference_audio);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(11)
|
||||
public static class AudioFragment extends PreferenceFragment {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preference_audio);
|
||||
}
|
||||
}
|
||||
|
||||
public static class PlaybackActivity extends PreferenceActivity {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preference_playback);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(11)
|
||||
public static class PlaybackFragment extends PreferenceFragment {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preference_playback);
|
||||
}
|
||||
}
|
||||
|
||||
public static class LibraryActivity extends PreferenceActivity {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preference_library);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(11)
|
||||
public static class LibraryFragment extends PreferenceFragment {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preference_library);
|
||||
PreferenceGroup group = getPreferenceScreen();
|
||||
group.removePreference(group.findPreference("controls_in_selector"));
|
||||
}
|
||||
}
|
||||
|
||||
public static class NotificationsActivity extends PreferenceActivity {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preference_notifications);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(11)
|
||||
public static class NotificationsFragment extends PreferenceFragment {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preference_notifications);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ShakeActivity extends PreferenceActivity {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preference_shake);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(11)
|
||||
public static class ShakeFragment extends PreferenceFragment {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preference_shake);
|
||||
}
|
||||
}
|
||||
|
||||
public static class MiscActivity extends PreferenceActivity {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preference_misc);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(11)
|
||||
public static class MiscFragment extends PreferenceFragment {
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preference_misc);
|
||||
}
|
||||
}
|
||||
|
||||
public static class AboutActivity extends Activity {
|
||||
@Override
|
||||
public void onCreate(Bundle state)
|
||||
{
|
||||
super.onCreate(state);
|
||||
|
||||
WebView view = new WebView(this);
|
||||
view.getSettings().setJavaScriptEnabled(true);
|
||||
view.loadUrl("file:///android_asset/about.html");
|
||||
view.setBackgroundColor(Color.TRANSPARENT);
|
||||
setContentView(view);
|
||||
}
|
||||
}
|
||||
|
||||
@TargetApi(11)
|
||||
public static class AboutFragment extends WebViewFragment {
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
||||
{
|
||||
WebView view = (WebView)super.onCreateView(inflater, container, savedInstanceState);
|
||||
view.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
|
||||
view.getSettings().setJavaScriptEnabled(true);
|
||||
view.loadUrl("file:///android_asset/about.html");
|
||||
view.setBackgroundColor(Color.TRANSPARENT);
|
||||
return view;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2012 Christopher Eby <kreed@kreed.org>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.kreed.vanilla;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.preference.Preference;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
/**
|
||||
* A preference that opens the tab order selector.
|
||||
*/
|
||||
public class TabOrderPreference extends Preference {
|
||||
public TabOrderPreference(Context context, AttributeSet attrs)
|
||||
{
|
||||
super(context, attrs);
|
||||
setTitle(R.string.tabs);
|
||||
setSummary(R.string.customize_tab_order);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick()
|
||||
{
|
||||
Context context = getContext();
|
||||
context.startActivity(new Intent(context, TabOrderActivity.class));
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user