Android 安卓键盘;围棋;按钮至";搜索“;

Android 安卓键盘;围棋;按钮至";搜索“;,android,android-softkeyboard,Android,Android Softkeyboard,有人能告诉我们如何在android键盘上用“搜索”来代替“开始”或“完成”按钮吗。(不是放大镜) 试试看 myEditText.setImeActionLabel(“搜索”,EditorInfo.IME\u操作\u未指定)IME\u ACTION\u UNSPECIFIED允许您在按钮中放入所需的任何文本。类似的内容 android:imeOptions="actionSearch" 可能有用。就你而言 还有其他选择,如 android:imeActionLabel="Search" 编辑

有人能告诉我们如何在android键盘上用“搜索”来代替“开始”或“完成”按钮吗。(不是放大镜)

试试看
myEditText.setImeActionLabel(“搜索”,EditorInfo.IME\u操作\u未指定)
IME\u ACTION\u UNSPECIFIED
允许您在按钮中放入所需的任何文本。

类似的内容

android:imeOptions="actionSearch"
可能有用。就你而言

还有其他选择,如

android:imeActionLabel="Search"
编辑

请检查一下这条线

根据以上链接,您只能在横向模式下获取全文

完整标签仅在IME有大量空间时显示 (例如,当标准键盘处于全屏模式时)

因此,我想您可以使用android:imeOptions=“actionSearch”,而文本
Search
将仅显示在横向视图中。

尝试以下操作:

 <EditText
    android:id="@+id/editTextSearch"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:ems="10"
    android:imeOptions="actionSearch"
    android:singleLine="true" >
 </EditText>


添加“android:singleLine”以正常工作

在您的编辑文本标记中添加以下两行:

 android:inputType="text"
 android:imeOptions="actionSearch"
并将setOnEditorActionListener()方法添加到editText,如下所示:

  etSearch.setOnEditorActionListener(new TextView.OnEditorActionListener() {
            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
                if(actionId == EditorInfo.IME_ACTION_SEARCH){
                     doSearch(); //Do whatever you intend to do when user click on search button in keyboard.
                   }

                    return true;
                }
                return false;
            }
        });

我仍然在拿放大镜。。plz帮助使用EditorInfo.IME\u ACTION\u未指定为ACTION添加android:inputType=“text”alsoHi sam,我仍然会得到上面的放大镜。。请告诉我我做错了什么你用了android:imeActionLabel=“Search”你能告诉我你在横向模式下看到了什么吗。我在更新中添加了一个新链接。是的,这就是我使用的。
code
code
请检查我添加的链接