Fix IME soft keyboard for Bluetooth rename device dialog.

The soft keyboard should automatically pop up when the user selects
the Bluetooth rename device menu item. Fixed by calling
setSoftInputMode(SOFT_INPUT_STATE_ALWAYS_VISIBLE) on the Window
containing the AlertDialog before showing.

The device name field should also be a single line field, with the
Done button causing the device to be renamed. Set the "singleLine"
attribute in the layout XML to true, and added a
TextView.OnEditorActionListener to set the device name and dismiss
the dialog for EditorInfo.IME_ACTION_DONE.

Bug: 5342542
Bug: 5343354
Change-Id: I550d8e9a59395ad66f8a9c11d29c0f2ef278c196
This commit is contained in:
Jake Hamby
2012-03-13 19:15:20 -07:00
parent 4f85e85666
commit a9534367b5
2 changed files with 26 additions and 5 deletions

View File

@@ -25,6 +25,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLength="50"
android:singleLine="true"
/>
</LinearLayout>