<xml version="1.0" encoding="utf-8"?><LinearLayoutandroid:id="@+id/MainLayout"xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="fill_parent"android:layout_height="fill_parent"android:orientation="vertical"android:background="@drawable/backrepeat">

<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/tile"
android:tileMode="repeat"
android:dither="true" />
代码方式:
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.icon);BitmapDrawable bd = new BitmapDrawable(bitmap);bd.setTileModeXY(TileMode.REPEAT , TileMode.REPEAT );bd.setDither(true);view.setBackgroundDrawable(bd);


<?xml version="1.0" encoding="utf-8"?><bitmap    xmlns:android="http://schemas.android.com/apk/res/android"    android:src="@[package:]drawable/drawable_resource"    android:antialias=["true" | "false"]    android:dither=["true" | "false"]    android:filter=["true" | "false"]    android:gravity=["top" | "bottom" | "left" | "right" | "center_vertical" |                      "fill_vertical" | "center_horizontal" | "fill_horizontal" |                      "center" | "fill" | "clip_vertical" | "clip_horizontal"]    android:tileMode=["disabled" | "clamp" | "repeat" | "mirror"] />



更多相关文章

  1. Android禁止锁屏,保持常亮方法
  2. Android(安卓)Studio 快捷键
  3. Android应用程序创建桌面快捷方式
  4. 让背景小图不是拉伸而是多个重复
  5. Android(安卓)USB Storage原理(1)
  6. 【Android】Android(安卓)彩信发送的两种方式+源代码
  7. [置顶] android常用网址收集
  8. 让背景小图不是拉伸而是多个重复
  9. Android布局管理器

随机推荐

  1. 关于ListView嵌套的问题
  2. CCSprite在Android平台下显示SDCard中的
  3. Android(安卓)Design Support Library—
  4. Linux设置qt-android开发环境
  5. Android(安卓)自定义View之View的绘制
  6. Android高低API版本兼容之@TargetApi
  7. 查看android sqlite数据库常用操作
  8. Android(安卓)应用程序发布流程---碗豆荚
  9. Android(安卓)Listener侦听的N种写法及实
  10. [Android(安卓)Training视频系列]2.4 Rec