diff options
author | Amith Yamasani <yamasani@google.com> | 2010-10-27 16:27:15 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-10-27 16:27:15 -0700 |
commit | 281a6b67a3f3f44311564527f6f6b7113b4fac89 (patch) | |
tree | 3e7efbc4c6b184b6c001f599e4994c8fd1138a3b /res | |
parent | 9446b7fe5038d97af74b105371e35ce6fba68158 (diff) | |
parent | 48e90002839e662eb1667471aebeb0483e9fb7db (diff) | |
download | packages_apps_settings-281a6b67a3f3f44311564527f6f6b7113b4fac89.zip packages_apps_settings-281a6b67a3f3f44311564527f6f6b7113b4fac89.tar.gz packages_apps_settings-281a6b67a3f3f44311564527f6f6b7113b4fac89.tar.bz2 |
Merge "Bluetooth settings revamp"
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable-hdpi/ic_preferences_collapsed.png | bin | 0 -> 3034 bytes | |||
-rw-r--r-- | res/drawable-hdpi/ic_preferences_expanded.png | bin | 0 -> 3018 bytes | |||
-rw-r--r-- | res/drawable-mdpi/ic_preferences_collapsed.png | bin | 0 -> 3034 bytes | |||
-rw-r--r-- | res/drawable-mdpi/ic_preferences_expanded.png | bin | 0 -> 3018 bytes | |||
-rw-r--r-- | res/layout/preference_bluetooth.xml | 38 | ||||
-rw-r--r-- | res/layout/preference_bluetooth_profile.xml | 82 | ||||
-rw-r--r-- | res/layout/profile_icon_small.xml | 23 | ||||
-rw-r--r-- | res/values/strings.xml | 15 | ||||
-rw-r--r-- | res/xml/bluetooth_device_advanced.xml | 27 | ||||
-rw-r--r-- | res/xml/bluetooth_settings.xml | 18 | ||||
-rw-r--r-- | res/xml/device_picker.xml | 2 |
11 files changed, 185 insertions, 20 deletions
diff --git a/res/drawable-hdpi/ic_preferences_collapsed.png b/res/drawable-hdpi/ic_preferences_collapsed.png Binary files differnew file mode 100644 index 0000000..bc250d8 --- /dev/null +++ b/res/drawable-hdpi/ic_preferences_collapsed.png diff --git a/res/drawable-hdpi/ic_preferences_expanded.png b/res/drawable-hdpi/ic_preferences_expanded.png Binary files differnew file mode 100644 index 0000000..08c877d --- /dev/null +++ b/res/drawable-hdpi/ic_preferences_expanded.png diff --git a/res/drawable-mdpi/ic_preferences_collapsed.png b/res/drawable-mdpi/ic_preferences_collapsed.png Binary files differnew file mode 100644 index 0000000..bc250d8 --- /dev/null +++ b/res/drawable-mdpi/ic_preferences_collapsed.png diff --git a/res/drawable-mdpi/ic_preferences_expanded.png b/res/drawable-mdpi/ic_preferences_expanded.png Binary files differnew file mode 100644 index 0000000..08c877d --- /dev/null +++ b/res/drawable-mdpi/ic_preferences_expanded.png diff --git a/res/layout/preference_bluetooth.xml b/res/layout/preference_bluetooth.xml index 501c827..531bdc3 100644 --- a/res/layout/preference_bluetooth.xml +++ b/res/layout/preference_bluetooth.xml @@ -21,7 +21,14 @@ android:gravity="center_vertical" android:paddingLeft="16dip" android:paddingRight="?android:attr/scrollbarSize"> - + + <ImageView + android:id="@+id/btClass" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginRight="12dip" + android:layout_gravity="center_vertical" /> + <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -29,13 +36,15 @@ android:layout_marginTop="6dip" android:layout_marginBottom="6dip" android:layout_weight="1"> - + + <!-- Device name --> <TextView android:id="@+android:id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:textAppearance="?android:attr/textAppearanceLarge" /> - + + <!-- Status summary --> <TextView android:id="@+android:id/summary" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -44,13 +53,30 @@ android:textAppearance="?android:attr/textAppearanceSmall" android:maxLines="2" /> + <LinearLayout android:id="@+id/profileIcons" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentRight="true" + /> </RelativeLayout> + <!-- Divider --> <ImageView - android:id="@+id/btClass" + android:id="@+id/divider" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginRight="12dip" - android:layout_gravity="center_vertical" /> + android:layout_marginRight="8dip" + android:layout_gravity="center_vertical" + android:src="@drawable/nav_divider" + /> + + <!-- Details button --> + <ImageView + android:id="@+id/deviceDetails" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:src="@drawable/icon" /> </LinearLayout> diff --git a/res/layout/preference_bluetooth_profile.xml b/res/layout/preference_bluetooth_profile.xml new file mode 100644 index 0000000..5ec0a47 --- /dev/null +++ b/res/layout/preference_bluetooth_profile.xml @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 The Android Open Source Project + + 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. +--> + +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:minHeight="?android:attr/listPreferredItemHeight" + android:gravity="center_vertical" + android:paddingLeft="16dip" + android:paddingRight="?android:attr/scrollbarSize"> + + <ImageView + android:id="@+id/profileIcon" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginRight="12dip" + android:layout_gravity="center_vertical" /> + + <RelativeLayout + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginRight="6dip" + android:layout_marginTop="6dip" + android:layout_marginBottom="6dip" + android:layout_weight="1"> + + <!-- Device name --> + <TextView android:id="@+android:id/title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:singleLine="true" + android:textAppearance="?android:attr/textAppearanceLarge" /> + + <!-- Status summary --> + <TextView android:id="@+android:id/summary" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_below="@android:id/title" + android:layout_alignLeft="@android:id/title" + android:textAppearance="?android:attr/textAppearanceSmall" + android:maxLines="2" /> + + <LinearLayout android:id="@+id/profileIcons" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerVertical="true" + android:layout_alignParentRight="true" + /> + </RelativeLayout> + + <!-- Divider --> + <ImageView + android:id="@+id/divider" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginRight="8dip" + android:layout_gravity="center_vertical" + android:src="@drawable/nav_divider" + /> + + <!-- Details button --> + <ImageView + android:id="@+id/profileExpand" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_vertical" + android:src="@drawable/icon" /> + +</LinearLayout> diff --git a/res/layout/profile_icon_small.xml b/res/layout/profile_icon_small.xml new file mode 100644 index 0000000..b0a9f4b --- /dev/null +++ b/res/layout/profile_icon_small.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2010 The Android Open Source Project + + 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. +--> +<ImageView + xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/icon" + android:layout_width="20dp" + android:layout_height="20dp" + android:layout_marginRight="4dip" + android:gravity="center" + android:layout_gravity="center_vertical" /> diff --git a/res/values/strings.xml b/res/values/strings.xml index d6221fe..da54e9d 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -782,7 +782,14 @@ <!-- Bluetooth settings: The title of the preference (list item) that initiates a scan for devices --> <string name="bluetooth_preference_scan_title">Scan for devices</string> - + <!-- Bluetooth settings: The title of the preference (list item) that finds nearby devices [CHAR LIMIT=30] --> + <string name="bluetooth_preference_find_nearby_title">Find nearby devices</string> + <!-- Bluetooth settings: The sub heading for device settings. [CHAR LIMIT=30] --> + <string name="bluetooth_preference_device_settings">Device settings</string> + <!-- Bluetooth settings: The sub heading for paired devices. [CHAR LIMIT=30] --> + <string name="bluetooth_preference_paired_devices">Paired devices</string> + <!-- Bluetooth settings: The sub heading for found devices when scanning. [CHAR LIMIT=30] --> + <string name="bluetooth_preference_found_devices">Found devices</string> <!-- Bluetooth settings. Context menu item for a device. Action will connect to all profiles on the device. --> <string name="bluetooth_device_context_connect">Connect</string> <!-- Bluetooth settings. Context menu item for a device. Action will disconnect from all profiles on the device. --> @@ -823,12 +830,18 @@ <!-- Bluetooth settings. Connection options screen. The title of the screen. --> <string name="bluetooth_device_advanced_title"><xliff:g id="device_name">%1$s</xliff:g> options</string> + <!-- Bluetooth settings. Connection options screen. Title of device actions section. [CHAR LIMIT=30] --> + <string name="bluetooth_device_advanced_device_actions_title">Device actions</string> <!-- Bluetooth settings. Connection options screen. The title of the checkbox that controls whether the device is in "online" mode or "offline" mode. This essentially is the checkbox that controls whether any checks / unchecks on a profile should be applied immediately, or next time the device is connected. --> <string name="bluetooth_device_advanced_online_mode_title">Connect</string> <!-- Bluetooth settings. Connection options screen. The summary of the online mode checkbox. This describes what the setting does in the context of the screen. --> <string name="bluetooth_device_advanced_online_mode_summary">Connect to Bluetooth device</string> <!-- Bluetooth settings. Connection options screen. The title of the header that is above all of the profiles. --> <string name="bluetooth_device_advanced_profile_header_title">Profiles</string> + <!-- Bluetooth settings. Connection options screen. Title for option to rename the device. [CHAR LIMIT=30] --> + <string name="bluetooth_device_advanced_rename_device">Rename device</string> + <!-- Bluetooth settings. Connection options screen. Title for checkbox to enable incoming file transfers [CHAR LIMIT=30] --> + <string name="bluetooth_device_advanced_enable_opp_title">Allow incoming file transfers</string> <!-- Bluetooth settings. Connection options screen. The summary for the A2DP checkbox preference when A2DP is connected. --> <string name="bluetooth_a2dp_profile_summary_connected">Connected to media audio</string> <!-- Bluetooth settings. Connection options screen. The summary for the headset checkbox preference when headset is connected. --> diff --git a/res/xml/bluetooth_device_advanced.xml b/res/xml/bluetooth_device_advanced.xml index 5611595..b4a0978 100644 --- a/res/xml/bluetooth_device_advanced.xml +++ b/res/xml/bluetooth_device_advanced.xml @@ -18,15 +18,32 @@ xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceCategory - android:key="title" /> - + android:key="title" + android:order="10" + android:title="@string/bluetooth_device_advanced_device_actions_title" /> + + <EditTextPreference + android:key="rename_device" + android:title="@string/bluetooth_device_advanced_rename_device" + android:order="20" + android:persistent="false" /> + <CheckBoxPreference - android:key="online_mode" - android:title="@string/bluetooth_device_advanced_online_mode_title" + android:key="allow_incoming" + android:title="@string/bluetooth_device_advanced_enable_opp_title" + android:order="30" android:persistent="false" /> - + + <Preference + android:key="unpair" + android:title="@string/bluetooth_device_context_unpair" + android:order="40" + android:persistent="false" + /> + <PreferenceCategory android:key="profile_container" + android:order="100" android:title="@string/bluetooth_device_advanced_profile_header_title"> <!-- Profile checkboxes will be added here programmatically. --> diff --git a/res/xml/bluetooth_settings.xml b/res/xml/bluetooth_settings.xml index 131f7a0..b7a0edc 100644 --- a/res/xml/bluetooth_settings.xml +++ b/res/xml/bluetooth_settings.xml @@ -18,6 +18,9 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:title="@string/bluetooth_settings" > + <PreferenceCategory + android:title="@string/bluetooth_preference_device_settings"/> + <CheckBoxPreference android:key="bt_checkbox" android:title="@string/bluetooth" @@ -40,15 +43,16 @@ android:summaryOff="@string/bluetooth_not_discoverable" android:persistent="false" /> - <Preference - android:key="bt_scan" - android:dependency="bt_checkbox" - android:title="@string/bluetooth_preference_scan_title" /> - - <com.android.settings.ProgressCategory + <PreferenceCategory android:key="bt_device_list" - android:title="@string/bluetooth_devices" + android:title="@string/bluetooth_preference_paired_devices" android:dependency="bt_checkbox" android:orderingFromXml="false" /> + <Preference + android:key="bt_find_nearby" + android:dependency="bt_checkbox" + android:fragment="com.android.settings.bluetooth.BluetoothSettings$FindNearby" + android:title="@string/bluetooth_preference_find_nearby_title" /> + </PreferenceScreen> diff --git a/res/xml/device_picker.xml b/res/xml/device_picker.xml index 7dd5b68..43b5829 100644 --- a/res/xml/device_picker.xml +++ b/res/xml/device_picker.xml @@ -23,7 +23,7 @@ <com.android.settings.ProgressCategory android:key="bt_device_list" - android:title="@string/bluetooth_devices" + android:title="@string/bluetooth_preference_found_devices" android:orderingFromXml="false" /> </PreferenceScreen> |