Chinaunix首页 | 论坛 | 博客
  • 博客访问: 141059
  • 博文数量: 29
  • 博客积分: 151
  • 博客等级: 入伍新兵
  • 技术积分: 225
  • 用 户 组: 普通用户
  • 注册时间: 2011-09-20 18:54
文章分类

全部博文(29)

文章存档

2012年(16)

2011年(13)

分类: LINUX

2012-08-14 23:50:35


点击(此处)折叠或打开

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android=""
  3.     android:orientation="vertical"
  4.     android:layout_width="fill_parent"
  5.     android:layout_height="fill_parent"
  6.     >
  7.     <!--
  8.         android:id —— 为控件指定相应的ID
  9.         android:text —— 指定控件当中显示的文字,需要注意的是,这里尽量使用strings.xml文件当中的字符串
  10.         android:grivity —— 指定控件的基本位置,比如说居中,居右等位置
  11.         android:textSize —— 指定控件当中字体的大小
  12.         android:background —— 指定该控件所使用的背景色,RGB命名法
  13.         android:width —— 指定控件的宽度
  14.         android:height —— 指定控件的高度
  15.         android:padding* —— 指定控件的内边距,也就是说控件当中的内容
  16.         android:sigleLine —— 如果设置为真的话,则将控件的内容在同一行当中进行显示
  17.      -->
  18.     <TextView
  19.         android:id="@+id/firstText"
  20.         android:text="第一行"
  21.         android:gravity="center_vertical"
  22.         android:textSize="15pt"
  23.         android:background="#aa0000"
  24.         android:layout_width="fill_parent"
  25.         android:layout_height="wrap_content"
  26.         android:layout_weight="10000"
  27.         android:singleLine="true"/>
  28.     <TextView
  29.         android:id="@+id/secondText"
  30.         android:text="第二行"
  31.         android:gravity="center_vertical"
  32.         android:textSize="15pt"
  33.         android:background="#0000aa"
  34.         android:layout_width="fill_parent"
  35.         android:layout_height="wrap_content"
  36.         android:layout_weight="1"/>
  37. </LinearLayout>

阅读(8822) | 评论(0) | 转发(0) |
0

上一篇:activity的生命周期

下一篇:Android资料

给主人留下些什么吧!~~