android 设置控件 圆角
16lz
2021-01-24
然后设置在 线性布局当中使用它,这时候 就可以将线性布局的边角变为圆角了。
- <?xmlversion="1.0"encoding="utf-8"?>
- <shapexmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <solidandroid:color="#ffffff"/>线性布局内部为白色
- <strokeandroid:width="2px"android:color="#cbcbcb"/>线条边框颜色
- <cornersandroid:topLeftRadius="5dp"android:topRightRadius="5dp"
- android:bottomRightRadius="5dp"android:bottomLeftRadius="5dp"/>各个边角的弯曲弧度
- </shape>
- <LinearLayout
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="5dp"
- android:layout_marginTop="5dp"
- android:background="@drawable/bg_coner_white"
- android:gravity="left|center_vertical"
- android:orientation="vertical">
更多相关文章
- 超级简单的Google VR SDK播放VR视频
- android实现通知栏透明
- Android学习(10) -- 常见布局
- android设置重复背景
- android progressbar 藏到imageview下面
- Android(安卓)GridView中GridAdapter 用法详解
- Android(安卓)ButterKnife Zelezny
- android ListView增加Animation效果
- Android学习笔记:RecyclerView