久久久久久久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模板網!

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

相關文檔推薦

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問題)
主站蜘蛛池模板: 欧美高清一区 | 免费黄色特级片 | 一区二区三区在线免费 | 人人干人人看 | 黄色av大片 | 久久久久中文字幕 | 九九九视频 | 亚洲一二三区在线观看 | 九九久久久久久 | 91麻豆精品国产91久久久资源速度 | 亚洲精品乱码久久久久久蜜桃91 | 三级av在线 | 亚洲不卡 | 91精品国产综合久久精品 | 精品免费国产视频 | 久久精品毛片 | 91看片在线观看 | 中文字幕在线观看一区 | 国产毛片av | 国产成人午夜高潮毛片 | 在线播放亚洲 | 91玖玖 | 成人性视频免费网站 | 国产精品99久久久精品免费观看 | 狠狠涩| 亚洲精品久久久久久一区二区 | www.国产91| 亚洲一级黄色 | 亚洲在线高清 | 大久 | 香蕉婷婷 | 免费成人高清 | 二区在线视频 | 日韩高清国产一区在线 | 午夜三级视频 | 国产免费一区二区三区 | 日韩视频在线播放 | 亚洲一区二区三区在线免费 | 亚洲精品日韩一区二区电影 | 中文字幕av一区 | 午夜一区|