Background Image Placement

后端 未结 4 985
不思量自难忘°
不思量自难忘° 2020-11-30 01:45

I\'m trying to set my root LinearLayout element (which is set to fill_parent in both dimensions) to have a background image which is always located in the lower left corner

4条回答
  •  抹茶落季
    2020-11-30 02:18

    You'll have to create a custom bitmap drawable with your bitmap in an XML file (eg "res/drawables/my_drawable.xml"

    
    
    

    And then set this drawable xml as your view's background ("@drawables/my_drawable"). The drawable XML format is very poorly documented in the Android site, though, so it's definitely not an easy problem to figure out how to solve on your own.

提交回复
热议问题