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

添加的 EditText 不是 TextInputEditText.請改用該課程

EditText added is not a TextInputEditText. Please switch to using that class instead(添加的 EditText 不是 TextInputEditText.請改用該課程)
本文介紹了添加的 EditText 不是 TextInputEditText.請改用該課程的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

限時送ChatGPT賬號..

我在 TextInputLayout 中使用 EditText,但是在將支持庫升級到 23.2.0 后,我在 logcat 中收到此警告,這兩者有什么區別一個常規的 EditText 和一個 TextInputEditText?我似乎找不到任何文檔.

解決方案

我也在想這個,

橫向 UI 編輯空名稱字段

編輯名稱,您可以看到 IME 不會提示您正在編輯的內容.

橫向 UI 編輯空的描述字段

編輯描述您可以看到 IME 提示您正在編輯的內容.

布局 XML

這兩個字段的區別在于它們的類型EditText VS TextInputEditText.這里重要的是 TextInputLayoutandroid:hint 而不是包裝的 EditText,當 TextInputEditText 的幾行Java 代碼有很大的不同.

名稱字段

描述字段

I'm using an EditText inside a TextInputLayout, but after upgrading the support library to 23.2.0, I get this warning in the logcat, What's the difference between a regular EditText and a TextInputEditText? I can't seem to find any documentation for it.

解決方案

I was wondering this too, Daniel Wilson gathered the documentation, but to the untrained eye it doesn't mean much. Here's what it's all about: "extract mode" is referring to the type of view that's shown when the space is too small, for example landscape on a phone. I'm using Galaxy S4 with Google Keyboard as input method editor (IME).

Landscape UI without visible IME

Based on the focus (on Description) you can see TextInputLayout in action pushing the hint outside the editor. Nothing special here, this is what TextInputLayout is supposed to do.

Landscape UI editing empty Name field

Editing the Name you can see that the IME doesn't give you a hint of what you're editing.

Landscape UI editing empty Description field

Editing the Description you can see that the IME gives you a hint of what you're editing.

Layout XMLs

The difference between the two fields is their type EditText VS TextInputEditText. The important thing here is that TextInputLayout has the android:hint and not the wrapped EditText, this is the case when TextInputEditText's few lines of Java code makes a big difference.

Name field

<android.support.design.widget.TextInputLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:hint="Item Name"
    >
    <EditText
        android:id="@+id/name"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        />
</android.support.design.widget.TextInputLayout>

Description field

<android.support.design.widget.TextInputLayout
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:hint="Item Description"
    >
    <android.support.design.widget.TextInputEditText
        android:id="@+id/description"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:inputType="textMultiLine"
        android:minLines="4"
        android:scrollbars="vertical"
        />
</android.support.design.widget.TextInputLayout>

這篇關于添加的 EditText 不是 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视频网址| 中文字幕视频在线观看 | 涩涩视频网 | 日日干日日射 | 91久久伊人 | 91人人爽 | 五月婷婷中文 | 日本高清视频网站 | 一区二区手机在线 | 国产一区免费 | 久久久精品网 | 亚洲成人av一区二区 | 国产日产精品一区二区三区四区 | 中文字幕亚洲欧美日韩在线不卡 | 日本亚洲精品成人欧美一区 | 99久久精品免费看国产四区 | 色综合天天天天做夜夜夜夜做 | 一区二区手机在线 | 91日b| 日本精品一区二区三区在线观看视频 | 免费在线播放黄色 | 国产精品一区二区在线观看 | 中文字幕一二三区 | 一级欧美| 黄色国产在线播放 | 欧美性tv| 极品粉嫩国产48尤物在线播放 | 精品国产一区二区三区久久影院 | 亚洲国产精品一区 | 精品国产一区二区三区观看不卡 | 天天曰夜夜操 | 一级亚洲| 成人国产精品久久 | 国产乱码一区 | 在线日韩视频 | 在线观看视频一区二区三区 | 欧美极品一区二区 | 久久久免费在线观看 |