当前位置: 首页 > news >正文

大连市城乡建设厅网站哈尔滨今天最新消息

大连市城乡建设厅网站,哈尔滨今天最新消息,全国公共资源交易平台官网,网页设计公司杭州表格布局#xff08;TableLayout#xff09;类以行和列的形式管理控件#xff0c;每一行为一个TableRow对象#xff0c;也可以作为一个View对象#xff1b;当为View对象时#xff0c;该View对象将跨越该行的所有列。在TableRow中可以添加子控件#xff0c;每添加一个子控… 表格布局TableLayout类以行和列的形式管理控件每一行为一个TableRow对象也可以作为一个View对象当为View对象时该View对象将跨越该行的所有列。在TableRow中可以添加子控件每添加一个子控件即为一列。 TableLayout布局中并不会为每一行、每一列或每个单元格绘制边框每一行可以有0个或多个单元格每个单元格为一个View对象。TableLayout中可以有空的单元格单元格也可以像HTML中那样跨越多个列。 在TableLayout布局中一个列的宽度由该列中最宽的那个单元格指定而表格的宽度是由父容器指定的。在TableLayout中可以为列设置三种属性 Shrinkable如果一个列被标识为Shrinkable则该列的宽度可以进行收缩以使表格能够适应其父容器的大小。Stretchable如果一个列被标识为Stretchable则该列的宽度可以进行拉伸以使填满表格中的空闲空间。Collapsed如果一个列被标识为Collapsed则该列会被隐藏。 注意一个列可以同时具有Shrinkable属性和Stretchable属性在这种情况下该列的宽度将任意拉伸或收缩以适应父容器。 TableLayout继承自LinearLayout类除了继承来自父类的属性和方法TableLayout类中还包含表格布局所特有的属性和方法如下表 属性名称 对应方法 描述android:collapseColumnssetColumnCollapsed(int,boolean)设置指定列号的列属性为Collapsedandroid:shrinkColumnssetShrinkAllColumns(boolean)设置指定列号的列属性为Shrinkableandroid:stretchColumnssetStretchAllColumns(boolean)设置指定列号的列属性为Stretchable 注意TableLayout中所谓的列序号是从0开始计算的。setShrinkAllColumns和setStretchAllColumns实现的功能是将表格中的所有列设置为Shrinkable或Stretchable。 下面来看一下效果 其中Main.xml代码如下 view plain   copy?xml version1.0 encodingutf-8? LinearLayout     android:idid/LinearLayout01     android:layout_widthfill_parent     android:layout_heightfill_parent     xmlns:androidhttp://schemas.android.com/apk/res/android    android:orientationvertical    android:backgrounddrawable/android    android:gravitybottom        !-- 第一行 --    TableLayout     android:idid/TableLayout01     android:layout_widthfill_parent     android:layout_heightwrap_content       android:background#FFFFFF    xmlns:androidhttp://schemas.android.com/apk/res/android        TextView           android:text我是单独的一行           android:idid/TextView01           android:layout_widthwrap_content           android:layout_heightwrap_content          android:layout_centerInParenttrue          android:background#fd8d8d          android:textColor#000000          android:layout_margin4px                /TextView    /TableLayout        TableLayout         android:idid/TableLayout02         android:layout_widthfill_parent         android:layout_heightwrap_content          android:background#FFFFFF        android:stretchColumns0        xmlns:androidhttp://schemas.android.com/apk/res/android        !-- android:stretchColumns0 设置0号列为可伸展的列当有多个列可伸展时用逗号隔开 --        !-- 第二行 --        TableRow           android:idid/TableRow01           android:layout_widthwrap_content           android:layout_heightwrap_content             !-- 第一列 --             TextView               android:text我是被拉上的一列               android:idid/TextView02               android:layout_widthwrap_content               android:layout_heightwrap_content              android:layout_centerInParenttrue              android:background#9cfda3              android:textColor#000000              android:layout_margin4px                /TextView              !-- 第二列 --             TextView               android:text我的内容少               android:idid/TextView03               android:layout_widthwrap_content               android:layout_heightwrap_content              android:layout_centerInParenttrue              android:background#8d9dfd              android:textColor#000000              android:layout_margin4px                             /TextView                 /TableRow      /TableLayout          TableLayout         android:idid/TableLayout03         android:layout_widthfill_parent         android:layout_heightwrap_content          android:background#FFFFFF        android:collapseColumns1        android:shrinkColumns0        xmlns:androidhttp://schemas.android.com/apk/res/android        !-- android:collapseColumns1 隐藏编号为1的列若有多个列要隐藏则用逗号隔开如0,2 --        !-- android:shrinkColumns0                      设置0号列为可收缩的列可收缩的列会纵向扩展                     若有多个列要收缩则用逗号隔开如0,2 --                             !-- 第三行 --        TableRow           android:idid/TableRow02           android:layout_widthwrap_content           android:layout_heightwrap_content             !-- 第一列 --             TextView               android:text我的被收缩的一列被收缩的一列               android:idid/TextView04               android:layout_widthwrap_content               android:layout_heightwrap_content              android:layout_centerInParenttrue              android:background#9cfda3              android:textColor#000000              android:layout_margin4px                /TextView              !-- 第二列被设置为隐藏了 --             TextView               android:text我的内容少               android:idid/TextView05               android:layout_widthwrap_content               android:layout_heightwrap_content              android:layout_centerInParenttrue              android:background#8d9dfd              android:textColor#000000              android:layout_margin4px                             /TextView              !-- 第三列 --             TextView               android:text我的内容比较长比较长比较长               android:idid/TextView06               android:layout_widthwrap_content               android:layout_heightwrap_content              android:layout_centerInParenttrue              android:background#fd8d8d              android:textColor#000000              android:layout_margin4px                             /TextView                 /TableRow        /TableLayout   /LinearLayout  Activity代码为 view plain   copypackage com.sunchis;  import android.app.Activity; import android.os.Bundle;  public class Android extends Activity {      Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.main);          //设置屏幕     } }
http://www.w-s-a.com/news/166493/

相关文章:

  • 网站建设哪家好公司跨境电商展会2023
  • 设计大神云集的网站是南通市 网站设计
  • 心理咨询网站模板企业画册封面设计
  • 做网站 南京网站建设的重难点分析
  • 深圳做网站980移动网站开发语言
  • 网站评论怎么做seo关键词优化方法
  • 市级部门网站建设自评报告网站优化文章怎么做
  • 可不可以异地建设网站学做网站培训班要多少钱
  • 茌平网站建设公司免费的云服务器有哪些
  • 手机网站单页面铜陵网站制作公司
  • 网站logo怎么做才清晰千库网官网首页登录
  • 山西省建设银行网站首页长沙网站建设制作
  • 襄阳市做网站 优帮云百度搜索次数统计
  • 自己做视频直播网站盐城做网站多少钱
  • 买个网站服务器多少钱重庆做的好的房产网站
  • 深圳定制建站网站建设推广关键词怎么设置
  • 宝山网站建设 网站外包修改wordpress版权
  • 建立网站的基本步骤新网站多久会被百度收录
  • 软件设计开发流程图廊坊关键词seo排名方案
  • 南山住房和建设局网站网站被k 多久恢复
  • 阿里买域名 电脑做网站做简历哪个网站好
  • 个人网站免费服务器单页网站的域名
  • 网站设计简单讲解小店怎么做网站
  • 校园网站的意义wordpress去除更新
  • 网站开发用python吗常用的网页开发工具有哪些
  • 北京市住房建设投资建设网站做商城网站要哪些流程
  • seo网站改版杭州建设局官网
  • 物流网站建设策划书泰然建设网站
  • 百度做网站的费用采集发布wordpress
  • 网站运维公司有哪些防录屏网站怎么做