1. <?xmlversion="1.0"encoding="utf-8"?>
  2. <shapexmlns:android="http://schemas.android.com/apk/res/android"
  3. android:shape="rectangle">
  4. <solidandroid:color="#ffffff"/>线性布局内部为白色
  5. <strokeandroid:width="2px"android:color="#cbcbcb"/>线条边框颜色
  6. <cornersandroid:topLeftRadius="5dp"android:topRightRadius="5dp"
  7. android:bottomRightRadius="5dp"android:bottomLeftRadius="5dp"/>各个边角的弯曲弧度
  8. </shape>
然后设置在 线性布局当中使用它,这时候 就可以将线性布局的边角变为圆角了。
            
  1. <LinearLayout
  2. android:layout_width="fill_parent"
  3. android:layout_height="wrap_content"
  4. android:layout_marginBottom="5dp"
  5. android:layout_marginTop="5dp"
  6. android:background="@drawable/bg_coner_white"
  7. android:gravity="left|center_vertical"
  8. android:orientation="vertical">

更多相关文章

  1. 超级简单的Google VR SDK播放VR视频
  2. android实现通知栏透明
  3. Android学习(10) -- 常见布局
  4. android设置重复背景
  5. android progressbar 藏到imageview下面
  6. Android(安卓)GridView中GridAdapter 用法详解
  7. Android(安卓)ButterKnife Zelezny
  8. android ListView增加Animation效果
  9. Android学习笔记:RecyclerView

随机推荐

  1. 详解MySQL中的数据类型和schema优化
  2. Servermanager启动连接数据库错误如何解
  3. MySQL数据中很多换行符和回车符的解决方
  4. SQL实现相邻两行数据的加减乘除操作
  5. mysql判断表是否存在然后批量删除的操作
  6. Mysql InnoDB和MyISAM区别原理解析
  7. Mysql 聚合函数嵌套使用操作
  8. mysql查询的时候给字段赋默认值操作
  9. mysql 主从复制如何跳过报错
  10. MySql分组后随机获取每组一条数据的操作