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

在android中更改edittext的背景顏色

Change background color of edittext in android(在android中更改edittext的背景顏色)
本文介紹了在android中更改edittext的背景顏色的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

限時(shí)送ChatGPT賬號(hào)..

如果我使用下面的代碼更改我的 EditText 的背景顏色,看起來(lái)該框已縮小,并且它不保持默認(rèn)存在的藍(lán)色底邊框的 ICS 主題EditText.

If I change the background color of my EditText using the below code, it looks like the box is shrunken and it doesn't maintain the ICS theme of a blue bottom border that exists for a default EditText.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#99000000"
    >
    <EditText
        android:id="@+id/id_nick_name"
        android:layout_marginTop="80dip"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="#ffffff"  
    />
    <LinearLayout 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
             android:layout_marginTop="10dip"
             android:layout_marginLeft="20dip"
             android:layout_marginRight="20dip"
            android:orientation="horizontal"
            android:layout_below="@+id/id_nick_name">  
        <Button 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="add"
            android:layout_weight="1"
            />
         <Button 
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:text="cancel"
            android:layout_weight="1"
            />
    </LinearLayout>
</RelativeLayout>

這是它的樣子:

推薦答案

你應(yīng)該做的是為edittext創(chuàng)建一個(gè)9補(bǔ)丁圖像并將該圖像設(shè)置為編輯文本背景.您可以使用 this 網(wǎng)站

What you should do is to create a 9 patch image for edittext and set that image as edit text background. You can create 9 patches using this website

我附上一個(gè)示例 9 補(bǔ)丁圖像供您參考.將其用作編輯文本背景,您會(huì)得到一個(gè)想法.右鍵單擊圖像并選擇圖像另存為".保存圖片時(shí)不要忘記將其擴(kuò)展名設(shè)為9.png"

I am attaching a sample 9 patch image for your reference.Use it as edittext background and you will get an idea.Right click the image and select "save image as". When you save the image dont forget to give its extension as "9.png"

這篇關(guān)于在android中更改edittext的背景顏色的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(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(更改光標(biāo)在展開的 EditText 中的開始位置)
EditText, adjustPan, ScrollView issue in android(android中的EditText,adjustPan,ScrollView問(wèn)題)
主站蜘蛛池模板: 一级做a爱片性色毛片 | 亚洲一区二区 | 毛片一区 | 黄色免费网站在线观看 | 国产高清网站 | 精品乱子伦一区二区三区 | 国产成人精品一区二区三区福利 | 四虎看片 | 97国产视频 | 韩国精品一区二区 | 亚洲黄色精品 | 五月天激情综合 | 久久性视频 | 色综合天天综合网天天狠天天 | 精品成人在线 | 窝窝午夜精品一区二区 | 婷婷午夜天| 日韩精品一二区 | 成年人小视频 | 欧美成人免费 | 天天躁日日躁狠狠躁av麻豆男男 | 亚洲午夜精品一区二区三区 | 免费毛片在线 | 色吧综合 | 激情做爰呻吟视频舌吻 | 国产91清纯白嫩初高中在线观看 | 日本一区二区三区四区五区 | av免费在线观看网站 | 国产精品高潮呻吟 | 老司机午夜视频 | 日韩在线不卡 | 五月天综合网 | 国产成人精品视频 | 亚洲欧洲视频 | 黄色国产网站 | 中文在线观看免费视频 | 日韩中文字幕在线播放 | 国产色在线 | 日韩在线免费观看视频 | 日韩欧美高清视频 | 久久精品www人人爽人人 |