添加所有边框

<?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中如何设置边框_第1张图片

更多相关文章

  1. Android修改SwitchPreference的颜色
  2. android 各种颜色值 colors.xml
  3. Android碎碎念 -- 设置文字颜色
  4. android 利用环形菜单制作带数字表盘的时钟
  5. Android TextView 个别文字字体颜色格式
  6. 点击listitem按下效果替换默认颜色
  7. ImageButton"边框"的问题
  8. Android 圆角外边框
  9. Android状态栏颜色修改

随机推荐

  1. 常用布局之相对布局
  2. 第二届google Android(安卓)应用开发中国
  3. 【Android】onInterceptTouchEvent 方法
  4. Android(安卓)版本区别
  5. php数据类型
  6. android Ubuntu adb: cannot execute bin
  7. Android使用ThreadLocal+PriorityQueue构
  8. Android(安卓)EditText 点击时不弹出键盘
  9. Android(安卓)Studio安装教程及第一个Hel
  10. Android(安卓)说说钟表控件