Android 圆形left,right,bottom三边框的颜色设置
来源:互联网 发布:关闭135 端口 编辑:程序博客网 时间:2024/05/18 07:40
在一个LinearLayout设置它的圆形left,right,bottom三边框的颜色
效果图如下:
在drawable中加一个bg_notice.xml文件,代码如下:
<?xml version="1.0" encoding="utf-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <!--去掉上边框--> <item android:top="-1dp"> <shape> <!-- 主体背景颜色值 --> <solid android:color="@color/white" /> <!--边框的颜色--> <stroke android:width="1dp" android:color="#ddd" /> <!--圆形--> <corners android:bottomLeftRadius="5dip" android:bottomRightRadius="5dip" android:topLeftRadius="0dip" android:topRightRadius="0dip" /> </shape> </item></layer-list>
然后在res布局文件中引用上边这个xml:
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:background="@drawable/bg_notice"> <TextView android:id="@+id/notice_text" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="15dp"/></LinearLayout>
0 0
- Android 圆形left,right,bottom三边框的颜色设置
- 动态设置 android:drawableTop|Right|Left|Bottom
- absolute同时设置left,right,top,bottom
- Android圆形ImageView,可设置最多两个宽度不同且颜色不同的圆形边框
- margin: left right /top bottom的怪异
- View的位置--top, left, bottom, right
- 元素position设置为fixed而未指定top、bottom、left、right时的定位
- Android view 的参数x y left right top bottom translationX translationY
- Android-区分 View 的 translationX、Y , X、Y 和 Left、Top,Right、Bottom
- 动态设置android:drawableLeft|Right|Top|Bottom
- 动态设置android:drawableLeft|Right|Top|Bottom
- 动态设置android:drawableLeft|Right|Top|Bottom
- 动态设置android:drawableLeft|Right|Top|Bottom
- 动态设置android:drawableLeft|Right|Top|Bottom
- 动态设置android:drawableLeft|Right|Top|Bottom
- Android 设置 drawableLeft|Right|Top|Bottom
- 动态设置android:drawableLeft|Right|Top|Bottom
- css中absolute定位的top bottom left right
- kali Linux使用蓝牙
- javascript(substr与substring)
- 矩阵快速幂
- 如何全面掌握别人家的APP数据
- 基于锁相环的频率合成电路设计
- Android 圆形left,right,bottom三边框的颜色设置
- Linux下DIR,dirent,stat等结构体详解
- Web UI自动化测试中处理页面元素过期问题
- ABAP如何检查字符串是否为日期或时间格式
- Android模拟器-HAX kernel module is not installed问题
- 获取本机IPv4地址
- 2014级博客链接
- Android的事件处理机制详解(一)-----基于监听的事件处理机制
- Linux下命令行安装weblogic10.3.6