Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7563360
  • 博文数量: 961
  • 博客积分: 15795
  • 博客等级: 上将
  • 技术积分: 16612
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-07 14:23
文章分类

全部博文(961)

文章存档

2016年(1)

2015年(61)

2014年(41)

2013年(51)

2012年(235)

2011年(391)

2010年(181)

分类: Android平台

2015-11-17 20:37:03

    ImageView组件的主要功能是为图片展示提供一个容器

点击(此处)折叠或打开

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout                     ?    定义线型布局管理器
  3.     xmlns:android=""
  4.     android:orientation="vertical"         ?    所有组件垂直摆放
  5.     android:layout_width="fill_parent"        ?    布局管理器宽度为屏幕宽度
  6.     android:layout_height="fill_parent">        ?    布局管理器高度为屏幕高度
  7.     <ImageView                    ?    定义图片显示组件
  8.         android:id="@+id/img"            ?    此组件ID,程序中使用
  9.         android:src="@drawable/mldn_3g"        ?    从drawable中读取图片ID
  10.         android:layout_width="fill_parent"        ?    组件的宽度为屏幕宽度
  11.         android:layout_height="wrap_content" />    ?    组件的高度为图片高度
  12. </LinearLayout>

020408_图片视图:ImageView.ppt
阅读(943) | 评论(0) | 转发(0) |
0

上一篇:下拉列表框

下一篇:图片按钮:ImageButton

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