久久久久久久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問題)
主站蜘蛛池模板: www.成人在线 | 国产91清纯白嫩初高中在线观看 | 欧美福利在线观看 | 国产免费黄色片 | 国产三级久久 | 夜夜骑夜夜 | 国产精品一区一区三区 | 日韩精品久久久 | 国产激情在线视频 | 激情五月激情综合网 | 三级a做爰全过程 | 国产精品二区一区二区aⅴ污介绍 | 成人欧美视频 | 亚洲+小说+欧美+激情+另类 | 成人欧美日韩 | 国产成人精品亚洲男人的天堂 | 亚洲最大网站 | 久久久久毛片 | 黄色片视频在线观看 | 日本不卡免费 | 一级特黄妇女高潮 | 日韩欧美在线播放 | 久久精品国产77777蜜臀 | 毛片免费在线观看 | 精品免费国产一区二区三区四区 | 欧美日韩亚洲国产 | 日韩黄色网址 | 午夜精品视频在线观看 | 成年人网站在线免费观看 | 青青草福利视频 | 毛片一级片 | av不卡在线| 国产精品美女久久久久av爽 | a级片在线观看 | 国产成人精品一区二区三区视频 | www.青青草 | 伊人在线 | 成年人国产 | 国产精品一品二品 | 久久免费高清视频 | 午夜精品久久久久久久 |