以LinearLayout为例,它提供的background属性将会将背景图片拉伸,相当难看。其实我们仅仅需做少量的改动就能够实现web编程中css背景图片的效果。来试试吧。
创建反复的背景图片
在drawable文件夹下创建一个repeat_bg.xml:
 

<?

xml version="1.0" encoding="utf-8"?>  
 <bitmap xmlns:andro> <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/repeat_bg"> </LinearLayout>   


相关文章:

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