Eclipse中Button如何设置圆角
来源:互联网 发布:广州聚焦网络 编辑:程序博客网 时间:2024/06/07 02:46
1.在res目录下的drawable目录下新建shape.xml文件
- <?xml version="1.0" encoding="utf-8"?>
- <shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle" >
- <!-- 填充的颜色 -->
- <solid android:color="#FF065E8D" />
- <!-- 设置按钮的四个角为弧形 -->
- <!-- android:radius 弧形的半径 -->
- <corners android:radius="15dip" />
- <!-- padding:Button里面的文字与Button边界的间隔 -->
- <padding
- android:bottom="10dp"
- android:left="10dp"
- android:right="10dp"
- android:top="10dp" />
- </shape>
2.在布局文件中调用。
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
- <Button
- android:id="@+id/roundButton"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@drawable/shape"
- android:text="圆角按钮" />
- </LinearLayout>
阅读全文
0 0
- Eclipse中Button如何设置圆角
- Android中设置圆角button
- 如何在Xib中设置Button的属性(圆角以及背景颜色)
- 如何在Xib中设置Button的属性(圆角以及背景颜色)
- button 圆角设置
- Eclipse中如何设置字体大小
- 在xib中通过kvc设置button的圆角
- iOS7设置圆角Button
- Button设置局部圆角
- IOS--设置圆角Button
- 给Button设置圆角
- 如何在代码中动态为TextView/Button设置drawableRight
- android中如何设置点击button页面跳转
- xib 中 Button 设置
- 如何在eclipse中设置mysql
- 如何在eclipse中设置字体大小
- 如何在eclipse中设置javadoc
- Eclipse中如何设置编码格式
- BZOJ1877(最小费用最大流+拆点)
- 工作流
- opencv矩阵元素类型转换和cvConvertScale()函数用法
- Oracle数据库里 查询一个表的主键被哪些表引用
- CSS基本选择器与CSS样式引入
- Eclipse中Button如何设置圆角
- Hash算法冲突解决方法分析
- vs2010
- C语言文件操作函数大全(超详细)
- 回顾U-boot(一)
- ccf认证最大的矩形
- Mybatis Dynamic Query 2.0 入门
- [HDU
- C++11:用户定义字面量