1. <tfoot id='HW44b'></tfoot>
    2. <small id='HW44b'></small><noframes id='HW44b'>

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

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

      将光标放在 EditText 中文本的末尾

      Place cursor at the end of text in EditText(将光标放在 EditText 中文本的末尾)

      <legend id='PNSsm'><style id='PNSsm'><dir id='PNSsm'><q id='PNSsm'></q></dir></style></legend>
      <i id='PNSsm'><tr id='PNSsm'><dt id='PNSsm'><q id='PNSsm'><span id='PNSsm'><b id='PNSsm'><form id='PNSsm'><ins id='PNSsm'></ins><ul id='PNSsm'></ul><sub id='PNSsm'></sub></form><legend id='PNSsm'></legend><bdo id='PNSsm'><pre id='PNSsm'><center id='PNSsm'></center></pre></bdo></b><th id='PNSsm'></th></span></q></dt></tr></i><div id='PNSsm'><tfoot id='PNSsm'></tfoot><dl id='PNSsm'><fieldset id='PNSsm'></fieldset></dl></div>
    3. <small id='PNSsm'></small><noframes id='PNSsm'>

        <bdo id='PNSsm'></bdo><ul id='PNSsm'></ul>

              <tbody id='PNSsm'></tbody>
                <tfoot id='PNSsm'></tfoot>
              • 本文介绍了将光标放在 EditText 中文本的末尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在更改 keyListener 上的 EditText 的值.

                I am changing the value of an EditText on keyListener.

                但是当我更改文本时,光标会移动到 EditText 的开头.我需要光标在文本的末尾.

                But when I change the text the cursor is moving to the beginning of the EditText. I need the cursor to be at the end of the text.

                如何将光标移动到 EditText 中的文本末尾.

                How to move the cursor to the end of the text in a EditText.

                推荐答案

                试试这个:

                更新:

                科特林:

                editText.setSelection(editText.length())//placing cursor at the end of the text
                

                Java:

                editText.setSelection(editText.getText().length());
                

                这篇关于将光标放在 EditText 中文本的末尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                相关文档推荐

                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 中的默认语言环境设置以使其保持一致?)

                <legend id='jHMMK'><style id='jHMMK'><dir id='jHMMK'><q id='jHMMK'></q></dir></style></legend>

                  <bdo id='jHMMK'></bdo><ul id='jHMMK'></ul>

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

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