想让软键盘上的enter键显示搜索图标:
xml中设置:
android:imeOptions="actionSearch"
android:inputType="text"
.java中:
mQueryTextView.setImeOptions(EditorInfo.IME_ACTION_SEARCH);//显示搜索图标。
mQueryTextView.setInputType(EditorInfo.TYPE_CLASS_TEXT);