如何使用圆角进行布局..? [英] How to make layout with rounded corners..?
本文介绍了如何使用圆角进行布局..?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何制作带有圆角的布局?我想对我的 LinearLayout
应用圆角.
How can I make a layout with rounded corners? I want to apply rounded corners to my LinearLayout
.
推荐答案
1:在drawables中定义layout_bg.xml:
1: Define layout_bg.xml in drawables:
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF"/>
<stroke android:width="3dp" android:color="#B1BCBE" />
<corners android:radius="10dp"/>
<padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" />
</shape>
2: 添加 layout_bg.xml
作为布局的背景
2: Add layout_bg.xml
as background to your layout
android:background="@drawable/layout_bg"
这篇关于如何使用圆角进行布局..?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文