概述
绘制圆角的 LinearLayout(.xml)
先在drawable新建一个blackground.xml
代码如下:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<!--背景颜色-->
<solid android:color="#fff" />
<!--分别设置左上,右上,左下,右下-->
<corners
android:bottomLeftRadius="5px"
android:bottomRightRadius="5px"
android:topLeftRadius="5px"
android:topRightRadius="5px" />
</shape>
然后是LinearLayout 里面的使用
代码如下:
<LinearLayout
android:id="@+id/bangding_alipay"
android:layout_width="fill_parent"
android:layout_height="45dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="20dp"
android:layout_weight="1"
android:background="@drawable/blackground"
android:gravity="center" >
</LinearLayout>
然后显示出来的就是圆角的背景了
最后
以上就是霸气御姐为你收集整理的设置圆角的 linearlayout(.xml方式)的全部内容,希望文章能够帮你解决设置圆角的 linearlayout(.xml方式)所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复