• <legend id='fFLXR'><style id='fFLXR'><dir id='fFLXR'><q id='fFLXR'></q></dir></style></legend>

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

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

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

    2. <tfoot id='fFLXR'></tfoot>
      1. Android:将 EditText 限制为数字

        时间:2023-10-01

          <tfoot id='hAiYc'></tfoot>

              <tbody id='hAiYc'></tbody>

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

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

                  本文介绍了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 限制为数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Android Thread 修改 EditText 下一篇:Android 警报对话框无法找到视图

                  相关文章

                  最新文章

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

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