创建重复的背景图片

在drawable目录下创建一个repeat_bg.xml: src是引用图片的名称

1 <?xmlversion="1.0"encoding="utf-8"?>
2 <bitmapxmlns:android="http://schemas.android.com/apk/res/android"
3 android:src="@drawable/bg"
4 android:tileMode="repeat"/>

然后在布局的xml文件中可以这样引用:
1 <LinearLayoutandroid:layout_width="fill_parent"
2 android:layout_height="fill_parent"
3 android:background="@drawable/repeat_bg">
4 </LinearLayout>

更多相关文章

  1. Android 布局之LinearLayout
  2. 基本布局之线性布局(LinearLayout)
  3. android五种布局特点
  4. 在代码中设置RelativeLayout布局中标签的android:layout_toLeftO
  5. Android帧布局实现霓虹灯的效果
  6. Android 背景图片重复平铺
  7. Android百分比布局(PercentRelativeLayout)嵌套NavigationView自
  8. Android中自定义控件之飞入飞出布局及随机布局实现方式

随机推荐

  1. 2010.12.28(4)——— android tab 过多的
  2. Android(安卓)DVM
  3. android UI 优化系列之 创建RGB565的缓存
  4. Android(安卓)Notes(06) - Touch事件分发
  5. android studio logcat 打印不出信息
  6. [Android] - 官方轉換dp, sp 至 pixel的
  7. 如何打log 检查 Android(安卓)CTS failur
  8. PendingIntent实现原理和代码
  9. Android崩溃
  10. Android中Http网络请求库Asnyc-http的使