Android TextView設(shè)置背景色與邊框的方法詳解
更新時間:2013年06月14日 16:56:54 作者:
本篇文章是對Android中TextView設(shè)置背景色與邊框的方法進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下
1.在drawable文件夾下面創(chuàng)建setbar_bg.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- 背景色 -->
<solid android:color="#FFE4B5"/>
<!-- 邊框色 -->
<stroke android:width="0.5dip" android:color="#81CE47" />
</shape>
2.設(shè)置TextView順序
android:background="@drawable/setbar_bg"
復(fù)制代碼 代碼如下:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- 背景色 -->
<solid android:color="#FFE4B5"/>
<!-- 邊框色 -->
<stroke android:width="0.5dip" android:color="#81CE47" />
</shape>
2.設(shè)置TextView順序
復(fù)制代碼 代碼如下:
android:background="@drawable/setbar_bg"
您可能感興趣的文章:
- android TextView設(shè)置中文字體加粗實(shí)現(xiàn)方法
- Android編程開發(fā)之TextView文字顯示和修改方法(附TextView屬性介紹)
- Android TextView字體顏色設(shè)置方法小結(jié)
- android實(shí)現(xiàn)上下滾動的TextView
- android TextView多行文本(超過3行)使用ellipsize屬性無效問題的解決方法
- android TextView不用ScrollViewe也可以滾動的方法
- Android設(shè)置TextView顯示指定個數(shù)字符,超過部分顯示...(省略號)的方法
- Android中TextView顯示圓圈背景或設(shè)置圓角的方法
- Android中TextView實(shí)現(xiàn)分段顯示不同顏色的字符串
- Android?妙用TextView實(shí)現(xiàn)左邊文字,右邊圖片
相關(guān)文章
Android中通過反射實(shí)現(xiàn)圓角ImageView代碼實(shí)例
這篇文章主要介紹了Android中通過反射實(shí)現(xiàn)圓角ImageView代碼實(shí)例,本文直接給出核心實(shí)現(xiàn)代碼,需要的朋友可以參考下2015-04-04Android中使用IntentService創(chuàng)建后臺服務(wù)實(shí)例
這篇文章主要介紹了Android中使用IntentService創(chuàng)建后臺服務(wù)實(shí)例,IntentService提供了在單個后臺線程運(yùn)行操作的簡單結(jié)構(gòu),需要的朋友可以參考下2014-06-06Android實(shí)現(xiàn)一個完美的倒計時功能
在Adroid應(yīng)用中,倒計時的功能使用的很多,例如點(diǎn)擊獲取短信驗證碼之后的倒計時等等,這篇文章主要給大家介紹了關(guān)于利用Android如何實(shí)現(xiàn)一個完美的倒計時功能的相關(guān)資料,需要的朋友可以參考下2021-11-11Android環(huán)形進(jìn)度條(安卓默認(rèn)形式)實(shí)例代碼
這篇文章主要介紹了Android環(huán)形進(jìn)度條(安卓默認(rèn)形式)實(shí)例代碼的相關(guān)資料,需要的朋友可以參考下2016-03-03Android Studio3.6設(shè)置Gradle Offline Mode的方法
這篇文章主要介紹了Android Studio3.6設(shè)置Gradle Offline Mode的方法,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2020-03-03