• 这个属性可以在LinearLayout的每个子布局直间添加一个“drawable”作为分割线,这个drawable必须有设定好的高度或者宽度,因此不能直接设置为“@color/….”
  • 这个属性要和android:showDividers一起使用才会生效
  • android:showDividers有“begining”,“middle”,“end”,“none”四种值。默认值为“none”,即不显示分割线。

    你还在为开发中频繁切换环境打包而烦恼吗?快来试试 Environment Switcher 吧!使用它可以在app运行时一键切换环境,而且还支持其他贴心小功能,有了它妈妈再也不用担心频繁环境切换了。https://github.com/CodeXiaoMai/EnvironmentSwitcher


android:showDividers=”beginning”

<LinearLayout    android:id="@+id/container"    android:layout_width="match_parent"    android:layout_height="wrap_content"    android:showDividers="beginning"    android:orientation="vertical"    android:divider="@drawable/list_divider"    android:padding="@dimen/margin_normal">    <Button        android:text="sdf"        android:layout_width="wrap_content"        android:layout_height="wrap_content" />    <Button        android:text="sdf"        android:layout_width="wrap_content"        android:layout_height="wrap_content" />    <Button        android:text="sdf"        android:layout_width="wrap_content"        android:layout_height="wrap_content" />LinearLayout>

只有第一个子控件上面有一条分割线

android:showDividers=”middle”

每个子空间之间都有一条分割线

android:showDividers=”end”

只有最后一个子控件有一条分割线

更多相关文章

  1. 【阿里云镜像】切换阿里巴巴开源镜像站镜像——Fedora镜像
  2. 【阿里云镜像】切换阿里巴巴开源镜像站镜像——Debian镜像
  3. 如何设置Android命令行环境变量
  4. ubuntu搭建Android(安卓)NDK环境与Android(安卓)Studio简单使用N
  5. Android(安卓)SDK 2.2 开发环境搭建
  6. Android(安卓)SDK 2.2 开发环境搭建
  7. Android禁止横屏竖屏切换
  8. Android禁止横屏竖屏切换
  9. Android横竖屏切换方法

随机推荐

  1. android AsyncTask
  2. Android横竖屏切换的解决方法
  3. android获取设备信息
  4. Android实现应用下载并自动安装apk包
  5. Android(安卓)系统自带的发送短信的界面
  6. Android问题集
  7. Android计时器
  8. 小区广播接收流程
  9. Android(安卓)APK 反编译工具
  10. 编写android拨打电话apk应用实例代码