本文介紹了更改 EditText 的線條顏色 - Android的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問(wèn)題描述
限時(shí)送ChatGPT賬號(hào)..
我可以更改 EditText
上的線條顏色嗎?當(dāng)處于活動(dòng)狀態(tài)時(shí),它有一些綠色.
Can I change the line color on EditText
. When is active it has some greenish color.
是否可以在活動(dòng)時(shí)僅更改線條的顏色,我該怎么做...?
Is it possible to change only the color of line when is active, and how can I do this...?
推薦答案
需要為編輯文本設(shè)置背景源.
You need to set background source for an edit text.
- 生成它http://android-holo-colors.com/
- 您可以將生成的可繪制對(duì)象用作自定義
EditText
的背景,例如android:background="@drawable/my_theme_edit_text"
.或者您可以在您的應(yīng)用主題中設(shè)置該背景 - 您可以在該站點(diǎn)的 .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
這篇關(guān)于更改 EditText 的線條顏色 - Android的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!