一、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>

更多相关文章

  1. android中TextView和EditText控件一些属性
  2. RelativeLayout用到的一些重要的属性
  3. Android显示图片自适应(控件+网页)
  4. android toast 和checkbox and radiogroup的使用
  5. 修改android默认时区语言
  6. android material design 军火库 控件
  7. android ImageView scaleType属性
  8. 如果Imageview与Linearlayout有叠加且可选资源长度不同,如何布局?
  9. Android控件笔记——在界面中显示图片

随机推荐

  1. 安卓编程小tips
  2. Android(安卓)Jetpack架构组件Navigation
  3. Android高仿网易新闻客户端之动态添加标
  4. Android(安卓)Bundle类别
  5. Android(安卓)ImageView控件的MaxWidth、
  6. Android有效解决加载大图片时内存溢出的
  7. android检查网络连接状态的变化,无网络时
  8. Introducing Quick Search Box for Andro
  9. Android(安卓)Studio svn检出项目一直报
  10. 【Android】Android实现截取当前屏幕图片