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

TextInputLayout 和 EditText 雙提示問題

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

問題描述

限時送ChatGPT賬號..

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

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

用于設置提示的代碼:

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

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

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"

并在代碼中設置來自 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'

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

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

相關文檔推薦

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問題)
主站蜘蛛池模板: 国产成人三级 | 久草青青草 | 成人一区二区三区 | 四虎成人网 | 毛片视频网站 | 久久久久九九九九 | 在线看黄色片 | 亚洲第一免费视频 | 国产免费小视频 | 亚洲一区二区三区在线视频 | 欧洲色综合 | 亚洲69视频 | 欧美日韩无 | 日韩精品一区二区三区免费视频 | 国产精品视频一区二区三区 | 亚洲成人免费网站 | 欧美日韩国产中文字幕 | 亚洲精品午夜精品 | 国产com| 国产女人水真多18毛片18精品 | 中文字幕理论片 | 亚洲一区二区免费 | 欧美成人黄色 | 国产一区欧美 | 日韩理论在线观看 | 一区二区三区久久久 | 日本三级一区 | 日日日操操操 | 这里只有精品视频 | 亚洲国产精品久久 | 免费在线观看黄色片 | 国产黄a三级三级看三级 | 久久国产一区 | 欧美不卡视频 | 日本在线观看网站 | 精品蜜桃一区二区三区 | 久久888| 国产又黄又爽 | 狠狠干狠狠操 | 躁躁躁日日躁 | 中文字幕超清在线观看 |