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

singleLine 屬性的替代方案(已棄用)TextInputEditText

Alternative of singleLine attribute (Deprecated) TextInputEditText(singleLine 屬性的替代方案(已棄用)TextInputEditText)
本文介紹了singleLine 屬性的替代方案(已棄用)TextInputEditText的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我最近使用了 TextInputEditText,我得到 singleLine 屬性 Deprecated

的 lint 錯誤

有沒有其他方法可以解決這個問題?

解決方案

android:singleLine 屬性自 API 級別 15.您可以使用 android:maxLines 實現相同的行為,它允許您指定任意數量的行.這優于 android:singleLine,后者限制您只允許一行.

I recently used TextInputEditText and I got lint error that singleLine attribute is Deprecated

<android.support.design.widget.TextInputEditText
            android:id="@+id/my_edit_text"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="@string/string_hint_dob"
            android:lines="5"/>
</android.support.design.widget.TextInputLayout>

Getting strike-through as below:

Is there any alternative way for this?

解決方案

The android:singleLine attribute has been deprecated since API Level 15. You can achieve the same behaviour by using android:maxLines, which allows you to specify an arbitrary number of lines. This is superior to android:singleLine, which restricts you to only allowing one line.

<TextView
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:minLines="2"
     android:maxLines="2" /> <!-- can specify arbitrary number of max lines -->

這篇關于singleLine 屬性的替代方案(已棄用)TextInputEditText的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

Cut, copy, paste in android(在android中剪切、復制、粘貼)
android EditText blends into background(android EditText 融入背景)
Change Line Color of EditText - Android(更改 EditText 的線條顏色 - Android)
EditText showing numbers with 2 decimals at all times(EditText 始終顯示帶 2 位小數的數字)
Changing where cursor starts in an expanded EditText(更改光標在展開的 EditText 中的開始位置)
EditText, adjustPan, ScrollView issue in android(android中的EditText,adjustPan,ScrollView問題)
主站蜘蛛池模板: 精品久久国产 | 国产福利免费视频 | 亚洲精品成人网 | 国产精品日本一区二区在线播放 | 91精品国产一区二区在线观看 | 中文字幕在线不卡播放 | 久久久久久亚洲精品 | 日韩一区二区在线观看视频 | 中文字幕1区2区3区 亚洲国产成人精品女人久久久 | 久久黄网 | 在线观看中文字幕 | 国产99久久精品一区二区永久免费 | 亚洲精品99久久久久久 | 日日噜| 国产精品久久久久久久久免费桃花 | 一级做a毛片 | 成人午夜在线 | 亚洲精品视频在线播放 | 国产精品国产三级国产aⅴ中文 | 伊人影院99 | 欧美成人激情 | 欧美激情精品久久久久久 | 成人影院免费视频 | 国产高清视频一区 | 福利网址| 中文字幕国产高清 | 午夜成人免费电影 | 久久在线视频 | 日韩一区二区三区在线 | 成人免费大片黄在线播放 | 国产精品免费av | 日韩精品在线免费观看视频 | 欧美一区免费在线观看 | 一级黄a视频 | 99精品免费视频 | 中文字幕在线一区二区三区 | 一本一道久久a久久精品蜜桃 | 亚洲不卡在线观看 | 玖玖爱365 | 精品国产一区二区三区久久久蜜月 | 国产黄色在线观看 |