一、ImageView属性:

  android:src = "@drawable/ic_launcher"——ImageView的内容图像(可以和android:background = "#00000"同时使用)

  android:background = "@drawable/ic_launcher"——ImageView的背景图像

  android:background = "#00000"——ImageView的RGB颜色

二、布局文件中设置ImageView控件

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" > <ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#f0f0f0"
android:src="@drawable/ic_launcher" /> <ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ic_launcher" /> <ImageView
android:id="@+id/imageView3"
android:layout_width="match_parent"
android:layout_height="20dp"
android:background="#f0f0f0" /> </LinearLayout>

Android控件之ImageView(显示图片的控件)的更多相关文章

  1. [Android]异步加载图片,内存缓存,文件缓存,imageview显示图片时增加淡入淡出动画

    以下内容为原创,欢迎转载,转载请注明 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/3574131.html  这个可以实现ImageView异步加载 ...

  2. 我写的一个 Qt 显示图片的控件

    Qt 中没有专门显示图片的控件.通常我们会使用QLabel来显示图片.可是QLabel 显示图片的能力还是有点弱.比方不支持图像的缩放一类的功能.使用起来不是非常方便. 因此我就自己写了个简单的类. ...

  3. 一个 Qt 显示图片的控件(继承QWidget,使用QPixmap记录图像,最后在paintEvent进行绘制,可缩放)

    Qt 中没有专门显示图片的控件,通常我们会使用QLabel来显示图片.但是QLabel 显示图片的能力还是有点弱.比如不支持图像的缩放一类的功能,使用起来不是很方便.因此我就自己写了个简单的类. 我这 ...

  4. 图解android开发在界面上显示图片

    图解android开发在界面上显示图片<申明:转自百度> <原文章地址:http://jingyan.baidu.com/article/49711c6153a277fa441b7c ...

  5. Android开发技巧——定制仿微信图片裁剪控件

    拍照--裁剪,或者是选择图片--裁剪,是我们设置头像或上传图片时经常需要的一组操作.上篇讲了Camera的使用,这篇讲一下我对图片裁剪的实现. 背景 下面的需求都来自产品. 裁剪图片要像微信那样,拖动 ...

  6. 我的Android最佳实践之—— ImageView中图片拉伸显示

    通过设置android:scaleType="fitXY"使得图片拉伸显示.补充:scaleType的属性有matrix(默认).center.centerCrop.centerI ...

  7. 在imge控件中直接显示图片(图片是byte[]格式)

    在工作过程中遇到了这个问题,在网上查了一些资料,结合自己的解决方法及解决过程总结了下,方面以后查阅.如果能帮到同样遇到这个问题的你,将非常高兴哦~_~ 由于asp.net中的Image控件是在Syst ...

  8. Android 自定义 HorizontalScrollView 打造再多图片(控件)也不怕 OOM 的横向滑动效果

    转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/38140505 自从Gallery被谷歌废弃以后,Google推荐使用ViewPa ...

  9. android studio设置imageview显示图片

    拖动imageview 选择图片 .png 代码引用: private Imageview pay; pay = (ImageView)findViewById(R.id.imageView2); p ...

随机推荐

  1. hdu 1205 从整体考虑

    吃糖果 Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submiss ...

  2. CentOS RPM安装MySQL-5.6

    1.检查是否有安装 安装之前应该先查询系统是否自在了mysql的软件包 rpm -qa|grep -i mysql 如果有的话需要先删除 rpm -e 软件名 --nodeps 2.下载安装包 cd/ ...

  3. 2016年11月4日 星期五 --出埃及记 Exodus 19:20

    2016年11月4日 星期五 --出埃及记 Exodus 19:20 The LORD descended to the top of Mount Sinai and called Moses to ...

  4. spark1.4

    spark1.4 Windows local调试环境搭建总结 1.scala版本 scala-2.10.4 官方推荐 scala-2.11.7[不推荐,非sbt项目.需要后加载] 2.spark版本 ...

  5. AfterEffects 关键帧辅助功能

    http://www.cocoachina.com/design/20160121/15073.html 标准缓动曲线查询网址:http://easings.net/zh-cn

  6. BZOJ 2229 最小割

    题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=2229 题意:给定一个带权无向图.若干询问,每个询问回答有多少点对(s,t)满足s和t的最 ...

  7. 协方差Covariance的表述推导

    今天想了一下关于概率论的一维数据期望.方差以及高维数据的矩阵表示,突然想到为什么在一维中 方差的表示为:V(x) = E((x-E(x))2) 而到了高维,这样的表述就成了协方差呢?V(X) = E( ...

  8. Create Custom Modal Dialog Windows For User Input In Oracle Forms

    An example is given below to how to create a modal dialog window in Oracle Forms for asking user inp ...

  9. django-crontab定时任务

    django-crontab实现定时任务 1 django-crontab安装 django-crontab安装: django-crontab加入:只需要将INSTALLED_APPS即可.如下代码 ...

  10. python 内建函数功能函数 abs() coerce() divmod() round() pow()

    >>> abs(-1)1>>> abs(10.)  10.0>>> abs(1.2-2.1j)2.4186773244895647>> ...