LinearLayout设置白色背景、灰色边框、倒圆角
2014-08-28 11:48
357 查看
drawable-hdpi下面建一个xml,例如linearlayout.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffff" />
<stroke
android:width="0.01dp"
android:color="#bfbfbf" />
<corners android:topLeftRadius="10dp"
android:topRightRadius="10dp"
android:bottomRightRadius="10dp"
android:bottomLeftRadius="10dp"/>
</shape>
在布局文件中写:
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="90dip"
android:layout_weight="10"
android:background="@drawable/linearlayout"
>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#ffffff" />
<stroke
android:width="0.01dp"
android:color="#bfbfbf" />
<corners android:topLeftRadius="10dp"
android:topRightRadius="10dp"
android:bottomRightRadius="10dp"
android:bottomLeftRadius="10dp"/>
</shape>
在布局文件中写:
<LinearLayout
android:orientation="vertical"
android:layout_width="0dp"
android:layout_height="90dip"
android:layout_weight="10"
android:background="@drawable/linearlayout"
>
相关文章推荐
- LinearLayout设置白色背景、灰色边框、倒圆角
- LinearLayout设置白色背景、灰色边框、倒圆角
- 如何用控件的CALayer 的特性创建 圆角界面,边框,和设置背景
- (转)#小美化#Android给TextView设置透明背景、圆角边框
- 可设置圆角背景边框的按钮, 通过调节色彩明度自动计算按下(pressed)状态颜色
- Android关于LinearLayout和RelativeLayout背景设置的区别
- Android中的LinearLayout(线性布局)设置背景图片
- 代码设置TextView、Button等控件圆角边框背景颜色
- Android给TextView设置透明背景、圆角边框
- Android给TextView设置透明背景、圆角边框
- 如何消除EDIT控件设置为只读情况下的灰色背景,能改为白色或其他背景?[
- 设置圆角背景边框的的按钮
- Android给TextView设置透明背景、圆角边框
- GradientDrawable 可以用来通过程序方式给控件设置背景如圆角,边框等
- LinearLayout边框,圆角
- Android给TextView和EditText等控件设置透明背景、圆角边框
- 设置背景的圆角,边框
- 如何用控件的CALayer 的特性创建 圆角界面,边框,和设置背景
- CSS新特性:圆角边框多栏Gird布局背景设置
- 将View存成bitmap,去色,作为LinearLayout背景,选中时为蓝色背景,未选中为灰色背景