久久久久久久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問題)
主站蜘蛛池模板: 免费在线日韩 | 国产精品入口麻豆www | 久久国产视频网站 | 免费视频一区 | 五月精品视频 | 黄色大片免费看 | 欧美高清一级片 | 一区天堂| 日韩精品 | 国产精品久久久久久久久久久久 | 欧美一级片在线 | 亚洲视频二区 | 国产福利在线视频 | 国产aa | 九九99久久 | 毛片一区 | 成人久久18免费网站 | 国产精品一区二区三区四区 | 国产网站在线免费观看 | 国产精品日韩一区 | 精品视频一二区 | 久久午夜电影 | 精品视频一区二区 | www.4567 | 欧美精品一级 | 欧美一区二区网站 | 亚洲美女一区 | 韩国精品一区 | 日韩成人在线网址 | 日韩快播电影网 | 亚洲综合在线视频 | 青青草社区 | 亚洲欧美精品在线观看 | 美女黄18岁以下禁止观看 | 国产精品美女久久久久久免费 | 日韩高清国产一区在线 | 日韩二区三区 | 精品欧美一区二区三区久久久小说 | 羞羞的视频免费观看 | 国产精品18久久久 | 日韩三级在线 |