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

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

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

        Android:将 EditText 限制为数字

        Android: Limiting EditText to numbers(Android:将 EditText 限制为数字)
      1. <tfoot id='7mwiB'></tfoot>

          <small id='7mwiB'></small><noframes id='7mwiB'>

              • <bdo id='7mwiB'></bdo><ul id='7mwiB'></ul>

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

                  <legend id='7mwiB'><style id='7mwiB'><dir id='7mwiB'><q id='7mwiB'></q></dir></style></legend>
                  本文介绍了Android:将 EditText 限制为数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在应用程序的 java 部分中创建 EditText 时,如何像在 xml 中那样将其限制为数字?例如:

                  When creating an EditText in the java portion of the application, how do you limit it to numbers like you would in the xml? For example:

                  new EditText(this);
                  

                  设置喜欢

                  <EditText
                      android:id="@+id/h1"
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"
                      android:inputType="numberDecimal"/>
                  

                  推荐答案

                  可能是这样的?

                  EditText text = new EditText(this);
                  text.setInputType(InputType.TYPE_NUMBER_FLAG_DECIMAL);
                  

                  这篇关于Android:将 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 中的默认语言环境设置以使其保持一致?)

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

                        <tbody id='qBNa2'></tbody>
                      <legend id='qBNa2'><style id='qBNa2'><dir id='qBNa2'><q id='qBNa2'></q></dir></style></legend>

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