Android中如何设置边框
16lz
2021-01-23
添加所有边框
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"> <solid android:color="#FFF" /> <stroke android:width="10dp" android:color="#000000" />shape>
stroke
绘制边框 类似css中border
solid
填充绘制形状中(矩形、环形灯)内部颜色
设置指定边框
<?xml version="1.0" encoding="utf-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:top="-10dp"> <shape> <solid android:color="#FFF" /> <stroke android:width="10dp" android:color="#000" /> shape> item>layer-list>
更多相关文章
- Android修改SwitchPreference的颜色
- android 各种颜色值 colors.xml
- Android碎碎念 -- 设置文字颜色
- android 利用环形菜单制作带数字表盘的时钟
- Android TextView 个别文字字体颜色格式
- 点击listitem按下效果替换默认颜色
- ImageButton"边框"的问题
- Android 圆角外边框
- Android状态栏颜色修改