shape的使用
来源:互联网 发布:多线程ping java 编辑:程序博客网 时间:2024/06/07 10:52
在res/drawable目录下创建一个shape.xml
1.<?xml version="1.0" encoding="utf-8"?>
2.<shape xmlns:Android="http://schemas.android.com/apk/res/android" > 3.
4. <solid android:color="#ffffffff" /> 5.
6. <corners android:radius="10dp" /> 7.
8. <padding 9. android:bottom="10dp" 10. android:left="5dp" 11. android:right="5dp" 12. android:top="5dp" /> 13.
14. <stroke 15. android:width="2dp" 16. android:color="#ff00bbe8" > 17. </stroke> 18.
19.</shape> 2、在需要的地方调用:
1.<EditText
2. android:id="@+id/mText" 3. android:layout_width="fill_parent" 4. android:layout_height="100px" 5. android:background="@drawable/shape" 6. android:textColor="#aa000000" 7. android:textSize="20dp" 8. android:gravity="top" 9. android:layout_margin="3dp" 10. android:paddingLeft="10dp" 11. android:paddingRight="10dp"/>
效果图如下所示:
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- <shape>的使用
- android shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- android:shape的使用
- 无法访问Github,该如何更新OpenStack代码? ( by quqi99 )
- ASP.Net 后台执行导出Excel list集合 有跨行合并
- NFS服务器的配置
- java 中break和continue的区别
- SQL Server视频
- shape的使用
- AJAX 跨域请求 – JSONP的使用,PHP实例详解
- 循环陷阱
- Linux中替换文件中的字符串
- 简单的缓冲区溢出
- STL vector用法
- 二叉树遍历
- openembedded git-fetch过程
- linux Shell 中常用的条件判断