gpt4 book ai didi

android - 如何绘制带状线作为背景

转载 作者:太空狗 更新时间:2023-10-29 16:41:22 26 4
gpt4 key购买 nike

有什么方法可以在 android 中绘制“带状线”作为背景吗?


附上图片以获得更好的说明:(Youtube App)

enter image description here

最佳答案

示例:

wood_pattern.xml 添加到 res/drawable/ :

<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap
android:src="@drawable/bg_wood"
android:tileMode="repeat"
android:dither="true"
android:antialias="true"/>
</item>
</layer-list>

将其设置为背景:

android:background="@drawable/wood_pattern"

关于android - 如何绘制带状线作为背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17247278/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com