<small id='Hvd0t'></small><noframes id='Hvd0t'>

<tfoot id='Hvd0t'></tfoot>

  1. <i id='Hvd0t'><tr id='Hvd0t'><dt id='Hvd0t'><q id='Hvd0t'><span id='Hvd0t'><b id='Hvd0t'><form id='Hvd0t'><ins id='Hvd0t'></ins><ul id='Hvd0t'></ul><sub id='Hvd0t'></sub></form><legend id='Hvd0t'></legend><bdo id='Hvd0t'><pre id='Hvd0t'><center id='Hvd0t'></center></pre></bdo></b><th id='Hvd0t'></th></span></q></dt></tr></i><div id='Hvd0t'><tfoot id='Hvd0t'></tfoot><dl id='Hvd0t'><fieldset id='Hvd0t'></fieldset></dl></div>

      <bdo id='Hvd0t'></bdo><ul id='Hvd0t'></ul>
      <legend id='Hvd0t'><style id='Hvd0t'><dir id='Hvd0t'><q id='Hvd0t'></q></dir></style></legend>

      Android:不知道如何使用 setImeActionLabel

      Android: Can#39;t figure how to use setImeActionLabel(Android:不知道如何使用 setImeActionLabel)
    1. <small id='Fc33W'></small><noframes id='Fc33W'>

      <legend id='Fc33W'><style id='Fc33W'><dir id='Fc33W'><q id='Fc33W'></q></dir></style></legend>
          <bdo id='Fc33W'></bdo><ul id='Fc33W'></ul>

              <i id='Fc33W'><tr id='Fc33W'><dt id='Fc33W'><q id='Fc33W'><span id='Fc33W'><b id='Fc33W'><form id='Fc33W'><ins id='Fc33W'></ins><ul id='Fc33W'></ul><sub id='Fc33W'></sub></form><legend id='Fc33W'></legend><bdo id='Fc33W'><pre id='Fc33W'><center id='Fc33W'></center></pre></bdo></b><th id='Fc33W'></th></span></q></dt></tr></i><div id='Fc33W'><tfoot id='Fc33W'></tfoot><dl id='Fc33W'><fieldset id='Fc33W'></fieldset></dl></div>
              <tfoot id='Fc33W'></tfoot>
                <tbody id='Fc33W'></tbody>

              • 本文介绍了Android:不知道如何使用 setImeActionLabel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我想要做的是更改虚拟键盘中显示的默认完成"标签.这是我没有运气的尝试:

                What I want to do is change the default "Done" label that appears in the virtual keyboard. Here's what I've tried without any luck:

                mSearchInput.setImeOptions(EditorInfo.IME_ACTION_DONE);
                mSearchInput.setImeActionLabel(getString(R.string.search_action_label), EditorInfo.IME_ACTION_DONE);
                

                但是,我能够处理对该按钮的点击,方法是:

                I am able, however, to handle a click on that button, with this:

                mSearchInput.setOnEditorActionListener(new TextView.OnEditorActionListener() {
                    @Override
                    public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
                        if (actionId == EditorInfo.IME_ACTION_DONE) {
                            performSearch();
                            return true;
                        }
                        return false;
                    }
                });
                

                目前我不知道如何更改该按钮上的标签.

                I'm clueless as to how I can change the label on that button at the moment.

                推荐答案

                imeActionLabel 设置全屏 IME 模式(即当您的手机在在风景中).如果要更改键盘右下角的按钮,可以将某些标志传递给 imeOptions.

                The imeActionLabel sets the label for the button that appears on the top right on full screen IME mode (i.e., when your phone is in landscape). If you want to change the button to the bottom right of the keyboard, you can pass certain flags to imeOptions.

                据我所知,对于该按钮,您仅限于一组特定的操作(请参阅 here 获取支持的标志的完整列表),但是由于您似乎想要一个搜索按钮,您所要做的就是稍微调整您的第一行并使用 IME_ACTION_SEARCH:

                As far as I know, for that button you're limited to a certain set of actions (see here for a full list of supported flags), but since you seem to want a search button, all you have to do is to slightly adjust your first line and use IME_ACTION_SEARCH:

                mSearchInput.setImeOptions(EditorInfo.IME_ACTION_SEARCH);
                

                请注意,该按钮的确切外观将取决于输入法.默认的 Android 键盘显示搜索标志的放大镜,而 Touch Input(HTC 的键盘)似乎完全不知道该标志,仍然显示返回按钮.

                Mind you, the exact appearance of that button will depend on the input method. The default Android keyboard shows a magnifier for the search flag, while the Touch Input (HTC's keyboard) seems completely unaware of that flag, still showing a return button.

                这篇关于Android:不知道如何使用 setImeActionLabel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                <small id='EZSEY'></small><noframes id='EZSEY'>

                • <legend id='EZSEY'><style id='EZSEY'><dir id='EZSEY'><q id='EZSEY'></q></dir></style></legend>
                • <tfoot id='EZSEY'></tfoot>

                        • <bdo id='EZSEY'></bdo><ul id='EZSEY'></ul>

                          <i id='EZSEY'><tr id='EZSEY'><dt id='EZSEY'><q id='EZSEY'><span id='EZSEY'><b id='EZSEY'><form id='EZSEY'><ins id='EZSEY'></ins><ul id='EZSEY'></ul><sub id='EZSEY'></sub></form><legend id='EZSEY'></legend><bdo id='EZSEY'><pre id='EZSEY'><center id='EZSEY'></center></pre></bdo></b><th id='EZSEY'></th></span></q></dt></tr></i><div id='EZSEY'><tfoot id='EZSEY'></tfoot><dl id='EZSEY'><fieldset id='EZSEY'></fieldset></dl></div>
                            <tbody id='EZSEY'></tbody>