本文介紹了更改 EditText 的線條顏色 - Android的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
限時送ChatGPT賬號..
我可以更改 EditText
上的線條顏色嗎?當處于活動狀態時,它有一些綠色.
Can I change the line color on EditText
. When is active it has some greenish color.
是否可以在活動時僅更改線條的顏色,我該怎么做...?
Is it possible to change only the color of line when is active, and how can I do this...?
推薦答案
需要為編輯文本設置背景源.
You need to set background source for an edit text.
- 生成它http://android-holo-colors.com/
- 您可以將生成的可繪制對象用作自定義
EditText
的背景,例如android:background="@drawable/my_theme_edit_text"
.或者您可以在您的應用主題中設置該背景 - 您可以在該站點的 .zip 文件中找到示例
- Generate it http://android-holo-colors.com/
- Than you can apply generated drawable as background like
android:background="@drawable/my_theme_edit_text"
for the customEditText
. Or you can set that background in your app theme - you will find example in .zip file from that site
這篇關于更改 EditText 的線條顏色 - Android的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!