Android之背景图片设置为重复而不是默认的拉伸
16lz
2022-01-15
创建重复的背景图片
在drawable目录下创建一个repeat_bg.xml: src是引用图片的名称
1 | <? xml version = "1.0" encoding = "utf-8" ?> |
2 | < bitmap xmlns:android = "http://schemas.android.com/apk/res/android" |
3 |
android:src = "@drawable/bg" |
4 |
android:tileMode = "repeat" /> |
1 | < LinearLayout android:layout_width = "fill_parent" |
2 |
android:layout_height = "fill_parent" |
3 |
android:background = "@drawable/repeat_bg" > |
4 | </ LinearLayout > |
更多相关文章
- Android(安卓)引用库项目,Debug 库项目
- 点击LinearLayout使用selector改变TextView字体颜色
- Android(安卓)背景图片重复平铺
- 转Android(安卓)安全攻防(一):SEAndroid的编译
- Android(安卓)SDK content Loader has encountered a problem.pa
- Android缓存的一个Demo
- react-native-s-alipay -- React Native 支付宝模块,同时支持ios
- Android(安卓)使用自定义注解代替重复写findViewById代码
- android Selector的用法