+ public void onStart() {
+ super.onStart();
+ // focus the search view and request the software keyboard be shown
+ View searchView = getView().findViewById(R.id.searchView);
+ if (searchView.requestFocus()) {
+ InputMethodManager imm = (InputMethodManager)
+ getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
+ if (imm != null) {
+ imm.showSoftInput(searchView.findFocus(), InputMethodManager.SHOW_IMPLICIT);
+ }
+ }
+ }
+
+ @Override