android -如何制作这样的背景
android -How to make background like this
我需要为列表视图中的每一行制作这样的背景。
有没有不使用背景图片的方法?我的意思是,是否可以仅使用 xml 可绘制对象来实现此目的?
感谢
您需要创建一个 repeatable
Bitmap
并将其设置为您的 layout
作为 background
。
使用这张图片
(如果你想改变颜色等,你可以编辑图像,如果你需要psd文件,我可以分享)
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/rep_bg"
android:tileMode="repeat" />
在你的layout
集合中
android:background="@drawable/backrepeat"
最终输出将是
我需要为列表视图中的每一行制作这样的背景。
有没有不使用背景图片的方法?我的意思是,是否可以仅使用 xml 可绘制对象来实现此目的?
感谢
您需要创建一个 repeatable
Bitmap
并将其设置为您的 layout
作为 background
。
使用这张图片
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/rep_bg"
android:tileMode="repeat" />
在你的layout
集合中
android:background="@drawable/backrepeat"
最终输出将是