1:在res/drawable文件下新建一个xml文件tool_bar_bg_repeat.xml比如为:

其中android:src="@drawable/tool_bar_bg_repeat"指定了要平铺的图片为tool_bar_bg_repeat

  android:tileMode="repeat"指定平铺模式为水平和垂直方向上。

2:引用该文件

注意引用的不是你的图片文件而是xml文件,这个xml文件中设置了你要使用的图片的平铺属性。

相关文章:

  • 2021-08-08
  • 2021-04-18
  • 2021-06-07
  • 2021-06-26
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-07
  • 2021-11-19
  • 2021-10-16
  • 2021-09-11
  • 2021-12-23
相关资源
相似解决方案