summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/bluetooth/BluetoothSettings.java
diff options
context:
space:
mode:
authorPauloftheWest <paulofthewest@google.com>2014-09-10 22:11:56 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-09-10 22:11:56 +0000
commit1675c786bfe213cce0d454d9eaf5fb51b4b4520c (patch)
treea480cccffa7a91f66a58dafaf6b8fb7bcf5c6185 /src/com/android/settings/bluetooth/BluetoothSettings.java
parent31915522b764a097c5d660cb933d4acb5eb0fcb4 (diff)
parent26747b9da06d08e2769ccb61a5d945b32cd924db (diff)
downloadpackages_apps_Settings-1675c786bfe213cce0d454d9eaf5fb51b4b4520c.zip
packages_apps_Settings-1675c786bfe213cce0d454d9eaf5fb51b4b4520c.tar.gz
packages_apps_Settings-1675c786bfe213cce0d454d9eaf5fb51b4b4520c.tar.bz2
Merge "Made Bluetooth device dialog fully scrollable." into lmp-dev
Diffstat (limited to 'src/com/android/settings/bluetooth/BluetoothSettings.java')
-rwxr-xr-xsrc/com/android/settings/bluetooth/BluetoothSettings.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/com/android/settings/bluetooth/BluetoothSettings.java b/src/com/android/settings/bluetooth/BluetoothSettings.java
index a084137..1282409 100755
--- a/src/com/android/settings/bluetooth/BluetoothSettings.java
+++ b/src/com/android/settings/bluetooth/BluetoothSettings.java
@@ -44,6 +44,7 @@ import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
+import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.TextView;
@@ -322,7 +323,6 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
mMyDevicePreference.setSummary(getResources().getString(
R.string.bluetooth_is_visible_message, mLocalAdapter.getName()));
mMyDevicePreference.setSelectable(false);
- mMyDevicePreference.setEnabled(false);
preferenceScreen.addPreference(mMyDevicePreference);
getActivity().invalidateOptionsMenu();
@@ -401,11 +401,17 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
parent.removeView(mSettingsDialogView);
}
}
+
if (profileFrag == null) {
LayoutInflater inflater = getActivity().getLayoutInflater();
mSettingsDialogView = inflater.inflate(R.layout.bluetooth_device_settings, null);
profileFrag = (DeviceProfilesSettings)activity.getFragmentManager()
.findFragmentById(R.id.bluetooth_fragment_settings);
+
+ // To enable scrolling we store the name field in a seperate header and add to
+ // the ListView of the profileFrag.
+ View header = inflater.inflate(R.layout.bluetooth_device_settings_header, null);
+ profileFrag.getListView().addHeaderView(header);
}
final View dialogLayout = mSettingsDialogView;
@@ -439,6 +445,10 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
AlertDialog dialog = settingsDialog.create();
dialog.create();
dialog.show();
+
+ // We must ensure that clicking on the EditText will bring up the keyboard.
+ dialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
+ | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
}
};