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

TextInputLayout 和 EditText 雙提示問題

TextInputLayout and EditText double hint issue(TextInputLayout 和 EditText 雙提示問題)
本文介紹了TextInputLayout 和 EditText 雙提示問題的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

限時送ChatGPT賬號..

我想在 EditText(在 TextInputLayout 中)中用 java 設(shè)置提示.

I want to set the hint with java in EditText(which is in TextInputLayout).

用于設(shè)置提示的代碼:

aET = (EditText) findViewById(R.id.aET);aET.setHint("h?");

但是即使edittext被聚焦,Hint也會顯示兩次(也在edittext內(nèi)部).

But even when edittext is focused, Hint is displayed twice(inside edittext also).

如果有人遇到過并找到解決方法,請告訴我

Please let me know if anyone had faced and found some workaround

editText 聚焦時...

editText 未聚焦時..

編輯[2015 年 7 月 10 日]:

<android.support.design.widget.TextInputLayout
     android:id="@+id/aTIL"
     android:layout_width="match_parent"
     android:layout_height="wrap_content">
     <EditText
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/aET" />
</android.support.design.widget.TextInputLayout>

推薦答案

我找到了解決方案!

在你的 EditText 中添加

In your EditText add

android:textColorHint="@android:color/transparent"

并在代碼中設(shè)置來自 EditText 的提示

And in the code set the hint from the EditText

aET.setHint("h?");

editText 中的提示被隱藏,TextInputLayout 中的提示被顯示.

The hint in your editText is hidden and the hint from the TextInputLayout is shown.

其他解決方案(最佳)

使用新版本的 android:design 更新 Gradle

Update Graddle with the new version of android:design

compile 'com.android.support:design:22.2.1'

這篇關(guān)于TextInputLayout 和 EditText 雙提示問題的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

Cut, copy, paste in android(在android中剪切、復(fù)制、粘貼)
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 位小數(shù)的數(shù)字)
Changing where cursor starts in an expanded EditText(更改光標在展開的 EditText 中的開始位置)
EditText, adjustPan, ScrollView issue in android(android中的EditText,adjustPan,ScrollView問題)
主站蜘蛛池模板: 久草.com | 日韩一区二区福利 | 成人精品一区二区三区中文字幕 | 婷婷二区 | 国产一区二区三区色淫影院 | 色在线免费视频 | 免费一区二区三区在线视频 | 一区在线观看视频 | 国产精品不卡 | 欧洲成人 | 免费成人午夜 | 天天天操 | 射欧美 | 久久久成人一区二区免费影院 | 日韩亚洲欧美一区 | 啪啪毛片 | 国产欧美精品一区二区三区 | 久久91av| 欧美性另类 | 国产91在线 | 亚洲 | 国产精品免费一区二区三区四区 | 亚洲精品久久区二区三区蜜桃臀 | 日日日干干干 | 色婷婷在线视频 | 91 在线| 欧美日韩福利视频 | 欧美日韩综合 | 国产精品久久久久久亚洲调教 | 国产乱码久久久久久一区二区 | 在线国产一区 | 男女视频91 | 亚洲激情一级片 | 欧美精品在线观看 | 欧美一级黄色片在线观看 | 午夜天堂精品久久久久 | 亚洲一区二区综合 | 99riav国产一区二区三区 | 国产精品毛片久久久久久 | 欧美一级欧美三级在线观看 | 欧洲精品在线观看 | av 一区二区三区 |