zoukankan      html  css  js  c++  java
  • Android随笔

    写简单实例

    使用LinearLayout的一个divider属性,直接为LinearLayout设置分割线 这里就需要你自己准备一张线的图片了 1)android:divider设置作为分割线的图片 2)android:showDividers设置分割线的位置,none(无),beginning(开始),end(结束),middle(每两个组件间) 3)dividerPadding设置分割线的Padding

    使用示例:

    实现代码:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
        xmlns:tools="http://schemas.android.com/tools"  
        android:id="@+id/LinearLayout1"  
        android:layout_width="match_parent"  
        android:layout_height="match_parent"  
        android:divider="@drawable/ktv_line_div"  
        android:orientation="vertical"  
        android:showDividers="middle"  
        android:dividerPadding="10dp"  
        tools:context="com.jay.example.linearlayoutdemo.MainActivity" >  
      
        <Button  
            android:layout_width="wrap_content"  
            android:layout_height="wrap_content"  
            android:text="按钮1" />  
      
        <Button  
            android:layout_width="wrap_content"  
            android:layout_height="wrap_content"  
            android:text="按钮2" />  
      
        <Button  
            android:layout_width="wrap_content"  
            android:layout_height="wrap_content"  
            android:text="按钮3" />  
      
    </LinearLayout>
  • 相关阅读:
    利用GitHub+Node.js+Hexo搭建个人博客(一)
    更丰富的符号工具包 Font Awesome
    Markdwon入门2
    Codechef:Fibonacci Number/FN——求通项+二次剩余+bsgs
    二次剩余理论
    基姆拉尔森公式和蔡勒公式(计算星期几)
    幂方程(模意义下)
    etcd
    mysql group by
    UUID
  • 原文地址:https://www.cnblogs.com/wrx166/p/14909402.html
Copyright © 2011-2022 走看看