Improve ActionMode

This commit is contained in:
Rashiq 2015-06-07 12:55:31 +02:00
parent 9a7fe54338
commit c9537ce120
2 changed files with 11 additions and 2 deletions

View File

@ -27,10 +27,11 @@
android:scrollHorizontally="true" android:scrollHorizontally="true"
android:inputType="text" android:inputType="text"
android:hint="@string/search_label" android:hint="@string/search_label"
android:focusableInTouchMode="true"
android:textColorHint="@color/hint_foreground_material_dark" android:textColorHint="@color/hint_foreground_material_dark"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:imeOptions="actionDone|flagNoExtractUi|flagNoFullscreen" android:imeOptions="actionDone|flagNoExtractUi|flagNoFullscreen"
android:layout_marginEnd="10dip"> android:layout_marginRight="10dip">
<requestFocus/> <requestFocus/>
</EditText> </EditText>

View File

@ -141,7 +141,15 @@ public class CompatFindActionModeCallback
// Show on screen keyboard // Show on screen keyboard
public void showSoftInput() { public void showSoftInput() {
mInput.showSoftInput(mEditText, 0); mEditText.requestFocus();
mEditText.setFocusable(true);
mEditText.setFocusableInTouchMode(true);
mEditText.requestFocusFromTouch();
if (mEditText.requestFocus()) {
mInput.showSoftInput(mEditText, InputMethodManager.SHOW_IMPLICIT);
}
} }
@Override @Override