<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(安卓)USB Storage原理(1)
  2. 【Android】Android(安卓)彩信发送的两种方式+源代码
  3. [置顶] android常用网址收集
  4. 让背景小图不是拉伸而是多个重复
  5. Android布局管理器
  6. android 安装软件
  7. Android的自定义长按
  8. Caused by: com.android.tools.r8.CompilationFailedException:
  9. Android(安卓)studio 导入github工程

随机推荐

  1. MySQL 如何查找并删除重复记录的实现
  2. 浅析MySQL 备份与恢复
  3. MySQL 4种常用的主从复制架构
  4. 简述MySQL InnoDB存储引擎
  5. 如何优雅、安全的关闭MySQL进程
  6. 详解MySQL8.0​ 字典表增强
  7. MySQL 如何查询当前最新事务ID
  8. MySQL 行锁和表锁的含义及区别详解
  9. MySQL如何快速修改表的表结构
  10. 关于MySQL主从复制的几种复制方式总结