<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 安装软件
  3. Android的自定义长按
  4. Caused by: com.android.tools.r8.CompilationFailedException:
  5. Android(安卓)studio 导入github工程
  6. android中TextView和EditText控件一些属性
  7. Android(安卓)GPS两点间距离
  8. Android发送短信功能代码
  9. 反抗金山毒霸的代码

随机推荐

  1. android查看第三方libs的jar源码
  2. android的Home键的监听封装工具类(一)
  3. Android bitmap的压缩方式总结
  4. Android Handler线程间通信机制分析
  5. Android抓屏源码
  6. Android Gson 泛型解析
  7. 改变android 选项卡的背景色
  8. 'ADB server didn't ACK'的解决办法
  9. Android_J2meBuilder介绍
  10. Android系统中调试动态链接库.so文件的步