久久久久久久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 不起作用的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  這是我的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 不工作,我不知道為什么,但它不工作.
                  我已經(jīng)檢查了堆棧上的其他答案,但它們也不起作用.
                  請(qǐng)檢查是否有任何 EditText 屬性沖突或有什么問(wèn)題?

                  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?

                  其他開(kāi)發(fā)人員也面臨同樣的問(wèn)題
                  查看評(píng)論這里 Mansi 和 aat 面臨同樣的問(wèn)題
                  而 這里 在評(píng)論中,Vincy 和 Riser 也面臨同樣的問(wèn)題

                  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

                  問(wèn)題已解決
                  我正在使用輸入過(guò)濾器,它覆蓋了 xml 中的最大長(zhǎng)度,使其無(wú)法工作.
                  輸入過(guò)濾器對(duì)我不起作用的原因是我使用了另一個(gè)輸入過(guò)濾器,它覆蓋了以前的 maxLength 輸入過(guò)濾器.
                  把它變成一個(gè)單一的輸入過(guò)濾器為我解決了這個(gè)問(wèn)題.

                  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.

                  推薦答案

                  相當(dāng)老的帖子但是,我注意到 XML 是一個(gè)實(shí)際的 EditText 對(duì)象,而您正在將過(guò)濾器添加到 TextView 處理它的方式與 EditText 不同.如果您要手動(dòng)添加 InputFilter 對(duì)象,則會(huì)覆蓋 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 的示例代碼似乎是一個(gè) TextView 對(duì)象.如果您手動(dòng)添加過(guò)濾器,請(qǐng)確保您拉出正確的視圖并將其轉(zhuǎn)換為 EditText - 它現(xiàn)在對(duì)我有用.

                  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.

                  祝你好運(yùn).

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

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

                  相關(guān)文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測(cè) 32 位 int 上的整數(shù)溢出?)
                  Local variables before return statements, does it matter?(return 語(yǔ)句之前的局部變量,這有關(guān)系嗎?)
                  How to convert Integer to int?(如何將整數(shù)轉(zhuǎn)換為整數(shù)?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內(nèi)創(chuàng)建一個(gè)隨機(jī)打亂數(shù)字的 int 數(shù)組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠?qū)?0xff000000 存儲(chǔ)為 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>

                            主站蜘蛛池模板: 精品影院 | 毛片黄片| 国产精品美女 | 国产精品美女久久久久久不卡 | 91精品国产91久久久久久 | 女女爱爱视频 | 亚洲性综合网 | 亚洲精品一区二区三区四区高清 | 一区二区三区四区免费视频 | 小草久久久久久久久爱六 | 99久久99热这里只有精品 | 日韩高清一区 | 午夜小视频免费观看 | 日本久久精 | 国产精品1 | 一区免费 | 欧美性久久 | 久久久久国产一区二区三区 | 情侣黄网站免费看 | 中文字幕成人在线 | 永久网站 | 亚洲第一女人av | 97超碰站| 一区二区精品电影 | 91久久久久久久久久久 | 欧美午夜激情在线 | 天天综合久久 | 二区在线视频 | 亚洲福利一区 | 日韩资源 | 免费国产一区二区 | 成人在线观看黄 | 国内精品久久久久久影视8 最新黄色在线观看 | 韩国主播午夜大尺度福利 | av一区二区三区 | 久久香蕉网 | 国产成人精品区一区二区不卡 | 日韩激情视频一区 | 在线观看亚洲欧美 | h视频在线观看免费 | 羞羞的视频免费在线观看 |