Android之背景图片设置为重复而不是默认的拉伸
2013-03-21 17:31
429 查看
在drawable目录下创建一个bitmap_bg.xml: src是引用图片的名称
然后在布局的xml文件中可以这样引用:
<?xml version="1.0" encoding="utf-8"?> <bitmap xmlns:android="http://schemas.android.com/apk/res/android" android:src="@drawable/ic_launcher" android:tileMode="repeat" > </bitmap>
然后在布局的xml文件中可以这样引用:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/bitmap_bg"> </RelativeLayout>
相关文章推荐
- Android之背景图片设置为重复而不是默认的拉伸
- Android设置背景图片平铺 创建重复的背景图片铺满屏幕
- 让背景小图不是拉伸而是多个重复(类似于将一张小图设置电脑桌面时的效果)
- css 如何让背景图片拉伸填充避免重复显示 不是平铺
- Android设置桌面背景图片的方法
- [Android开发] 代码code设置9.png/9-patch 图片背景后,此view中的TextView等控件显示不正常(常见于listview中)
- Android CollapsingToolbarLayout设置背景图片后如何透明状态栏
- 让背景小图不是拉伸而是多个重复
- Android设置背景图片平铺
- Android开发_如何设置按钮背景透明与半透明_图片背景透明
- Android基础小技术点:Android ListView设置背景图片及分割线、周边距
- css 如何让背景图片拉伸填充避免重复显示
- 解决android:background背景图片被拉伸问题
- 解决android:background背景图片被拉伸问题
- 解决android:background背景图片被拉伸问题
- android设置背景图片透明
- 有关Android的Activity背景图片设置和传递
- UIButton 设置背景图片 拉伸效果
- Android 背景图片重复 Background repeat
- AndroidStudio设置背景颜色,字体大小,默认显示行号