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

在android中更改edittext的背景顏色

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

問題描述

限時送ChatGPT賬號..

如果我使用下面的代碼更改我的 EditText 的背景顏色,看起來該框已縮小,并且它不保持默認存在的藍色底邊框的 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>

這是它的樣子:

推薦答案

你應該做的是為edittext創建一個9補丁圖像并將該圖像設置為編輯文本背景.您可以使用 this 網站

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

我附上一個示例 9 補丁圖像供您參考.將其用作編輯文本背景,您會得到一個想法.右鍵單擊圖像并選擇圖像另存為".保存圖片時不要忘記將其擴展名設為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"

這篇關于在android中更改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問題)
主站蜘蛛池模板: 欧美一区二区三区久久精品 | 日韩视频一区在线观看 | 一区在线观看 | 亚洲 欧美 另类 综合 偷拍 | 超碰天天 | 色精品视频 | 亚洲日本激情 | 亚洲一区久久 | 毛片毛片毛片毛片 | 色视频在线播放 | 精品在线观看一区二区 | 天天干狠狠操 | 精品一区二区三区四区外站 | 成人精品久久日伦片大全免费 | 国产精品久久久久久久粉嫩 | 请别相信他免费喜剧电影在线观看 | 亚洲九九色 | 国内精品久久久久 | 久久精品久久综合 | 夜夜夜久久久 | 一区二区成人 | 中文在线亚洲 | 成人欧美一区二区三区视频xxx | 中文字幕一区二区在线观看 | 黄色91在线 | 日本三级黄视频 | 亚洲国产aⅴ成人精品无吗 欧美激情欧美激情在线五月 | 午夜精品一区二区三区三上悠亚 | 91精品国产91久久综合桃花 | 久久艹免费视频 | 青草青草久热精品视频在线观看 | 国产精品久久精品 | 色就是色欧美 | 日韩中文字幕在线播放 | 国产精品日韩欧美一区二区三区 | av在线伊人| 女生羞羞网站 | 亚洲精品电影在线观看 | 久国产精品 | 成人小视频在线观看 | 欧美一级小视频 |