实现效果:

实现很简单,把TextView的android:background属性设置成自定义的一个xml样式文件。

android:background="@drawable/textview_style"

textview_style.xml文件里的内容:

<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android">  <solid android:color="#00FFFF" />    <corners android:radius="15dp" />      <padding           android:left="5dp"           android:top="5dp"          android:right="5dp"           android:bottom="5dp" /></shape>

corner android:radius属性就是圆角的设置。

更多相关文章

  1. Android(安卓)支持的 media 文件格式--MediaFile
  2. 5.ScrollView无法填充满屏幕
  3. Android浏览器如何打开本地html文件
  4. Android(安卓)布局
  5. Android(安卓)在xml布局配置文件中给Button按钮添加事件
  6. 第二部分
  7. Android(安卓)SDK Manager无法更新的解决
  8. android 导出签名APK--混淆文件proguard.cfg详解
  9. android通过读取系统属性设置字体缩放的默认值

随机推荐

  1. 上优酷土豆,再也不用看广告啦!
  2. 豆瓣开源的那些神库
  3. Spring Cloud Security:Oauth2结合JWT使用
  4. Spring Cloud Security:Oauth2实现单点登
  5. String还有长度限制?是多少?
  6. 仅需四步,整合SpringSecurity+JWT实现登录
  7. Spring Cloud Alibaba:Nacos 作为注册中心
  8. 百度亮了,Python帮你上Google
  9. 使用Jenkins一键打包部署SpringBoot应用,
  10. 你还在代码里做读写分离么,试试这个中间件