当前位置: 移动技术网 > 移动技术>移动开发>Android > Android TextView设置背景色与边框的方法详解

Android TextView设置背景色与边框的方法详解

2019年07月24日  | 移动技术网移动技术  | 我要评论
1.在drawable文件夹下面创建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.设置textview顺序
复制代码 代码如下:

 android:background="@drawable/setbar_bg"

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网