200字范文,内容丰富有趣,生活中的好帮手!
200字范文 > android linearlayout 边框 圆角 如何将圆角半径应用于LinearLayout

android linearlayout 边框 圆角 如何将圆角半径应用于LinearLayout

时间:2021-02-16 02:31:45

相关推荐

android linearlayout 边框 圆角 如何将圆角半径应用于LinearLayout

您可以在可绘制文件夹中创建一个XML文件。称呼它,例如,shape.xml

在shape.xml:

xmlns:android="/apk/res/android"

android:shape="rectangle" >

android:color="#888888" >

android:width="2dp"

android:color="#C4CDE0" >

android:left="5dp"

android:top="5dp"

android:right="5dp"

android:bottom="5dp" >

android:radius="11dp" >

的标记是您的具体问题。

根据需要进行更改。

而在你whatever_layout_name.xml:

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:orientation="vertical"

android:layout_margin="5dp"

android:background="@drawable/shape" >

这是我通常做我的应用程序。希望这可以帮助....

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。