久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

  • <small id='BbY1I'></small><noframes id='BbY1I'>

        <i id='BbY1I'><tr id='BbY1I'><dt id='BbY1I'><q id='BbY1I'><span id='BbY1I'><b id='BbY1I'><form id='BbY1I'><ins id='BbY1I'></ins><ul id='BbY1I'></ul><sub id='BbY1I'></sub></form><legend id='BbY1I'></legend><bdo id='BbY1I'><pre id='BbY1I'><center id='BbY1I'></center></pre></bdo></b><th id='BbY1I'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='BbY1I'><tfoot id='BbY1I'></tfoot><dl id='BbY1I'><fieldset id='BbY1I'></fieldset></dl></div>
          <bdo id='BbY1I'></bdo><ul id='BbY1I'></ul>
      1. <tfoot id='BbY1I'></tfoot>
      2. android EditText maxLength 不起作用

        android EditText maxLength not working(android EditText maxLength 不起作用)
          <i id='iS0s8'><tr id='iS0s8'><dt id='iS0s8'><q id='iS0s8'><span id='iS0s8'><b id='iS0s8'><form id='iS0s8'><ins id='iS0s8'></ins><ul id='iS0s8'></ul><sub id='iS0s8'></sub></form><legend id='iS0s8'></legend><bdo id='iS0s8'><pre id='iS0s8'><center id='iS0s8'></center></pre></bdo></b><th id='iS0s8'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='iS0s8'><tfoot id='iS0s8'></tfoot><dl id='iS0s8'><fieldset id='iS0s8'></fieldset></dl></div>
        • <small id='iS0s8'></small><noframes id='iS0s8'>

              <bdo id='iS0s8'></bdo><ul id='iS0s8'></ul>
            • <legend id='iS0s8'><style id='iS0s8'><dir id='iS0s8'><q id='iS0s8'></q></dir></style></legend><tfoot id='iS0s8'></tfoot>
                <tbody id='iS0s8'></tbody>

                  本文介紹了android EditText maxLength 不起作用的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  這是我的xml

                  <EditText
                  android:id="@+id/et_comment"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:inputType="textNoSuggestions|textVisiblePassword"
                  android:hint="Provide comments here..."
                  android:gravity="top"
                  android:maxLength="5"
                  android:textSize="12sp"
                  android:visibility="visible"
                  />
                  

                  使用此代碼也不行

                  TextView editEntryView = new TextView(...);
                  InputFilter[] filterArray = new InputFilter[1];
                  filterArray[0] = new InputFilter.LengthFilter(5);
                  editEntryView.setFilters(filterArray);
                  

                  maxLenth 不工作,我不知道為什么,但它不工作.
                  我已經檢查了堆棧上的其他答案,但它們也不起作用.
                  請檢查是否有任何 EditText 屬性沖突或有什么問題?

                  maxLenth is not working, I dont know why, but it isnt.
                  I have checked other answers on the stack but they are also not working.
                  Please check if any of EditText attributes are conflicting or what is the problem?

                  其他開發人員也面臨同樣的問題
                  查看評論這里 Mansi 和 aat 面臨同樣的問題
                  而 這里 在評論中,Vincy 和 Riser 也面臨同樣的問題

                  Same problem is being faced by other developers
                  See comments here same problem is being faced by Mansi and aat
                  And here in comments same problem is being faced by Vincy and Riser

                  問題已解決
                  我正在使用輸入過濾器,它覆蓋了 xml 中的最大長度,使其無法工作.
                  輸入過濾器對我不起作用的原因是我使用了另一個輸入過濾器,它覆蓋了以前的 maxLength 輸入過濾器.
                  把它變成一個單一的輸入過濾器為我解決了這個問題.

                  Problem solved
                  I was using input filter which overrides the max length in xml making it not able to work.
                  The reason input filter didn't worked for me was that I was using another input filter which overwrites the previous maxLength input filter.
                  Making it into a single input filter fixed that issue for me.

                  推薦答案

                  相當老的帖子但是,我注意到 XML 是一個實際的 EditText 對象,而您正在將過濾器添加到 TextView 處理它的方式與 EditText 不同.如果您要手動添加 InputFilter 對象,則會覆蓋 xml 屬性.

                  Fairly old post but, I noticed how the XML is an actual EditText object, while you are adding the filters to a TextView which could handle it differently than EditText. If you are adding an InputFilter object manually, the xml property is overridden.

                  您將 InputFilters 添加到 View 的示例代碼似乎是一個 TextView 對象.如果您手動添加過濾器,請確保您拉出正確的視圖并將其轉換為 EditText - 它現在對我有用.

                  The example code on which you add InputFilters to the View seems to be a TextView object. Make sure you pull the right view and it's being cast to EditText if you go with the manual addition of the filters--it's working for me right now.

                  祝你好運.

                  這篇關于android EditText maxLength 不起作用的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測 32 位 int 上的整數溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關系嗎?)
                  How to convert Integer to int?(如何將整數轉換為整數?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內創建一個隨機打亂數字的 int 數組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠將 0xff000000 存儲為 int?)
                  <i id='NuGvp'><tr id='NuGvp'><dt id='NuGvp'><q id='NuGvp'><span id='NuGvp'><b id='NuGvp'><form id='NuGvp'><ins id='NuGvp'></ins><ul id='NuGvp'></ul><sub id='NuGvp'></sub></form><legend id='NuGvp'></legend><bdo id='NuGvp'><pre id='NuGvp'><center id='NuGvp'></center></pre></bdo></b><th id='NuGvp'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='NuGvp'><tfoot id='NuGvp'></tfoot><dl id='NuGvp'><fieldset id='NuGvp'></fieldset></dl></div>

                    <tbody id='NuGvp'></tbody>
                  1. <tfoot id='NuGvp'></tfoot>

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

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

                            主站蜘蛛池模板: 精品欧美一区二区三区久久久 | 亚洲精品乱码久久久久久按摩观 | 亚洲精品粉嫩美女一区 | 国产伦一区二区三区视频 | 久久久久久久久久久国产 | 亚洲成人一级 | 福利成人| 国产玖玖 | 免费一区 | 久久男人天堂 | 特级特黄特色的免费大片 | 亚洲国产成人精品一区二区 | 午夜在线观看视频 | 色黄爽 | 99精品一区二区 | 久久成人久久 | 天天爽夜夜骑 | 国产精品视频在 | 久久久不卡网国产精品一区 | 日本不卡视频 | 黄色片a级 | av在线免费观看不卡 | 免费在线成人网 | 成年人黄色一级毛片 | 日韩日b视频 | 在线观看国产www | 国产精品毛片无码 | 亚洲国产成人在线观看 | 神马久久久久久久久久 | 婷婷激情综合 | 亚洲www| 在线视频日韩 | 国内精品一区二区 | 国产网站在线免费观看 | 日韩毛片在线观看 | 337p日本欧洲亚洲大胆 | 国产精品无码久久久久 | h片在线免费看 | 日本久久网站 | 久草免费在线视频 | 国产精品久久久久久久久免费樱桃 |