How to add XML drawable in Eclipse

后端 未结 8 675
青春惊慌失措
青春惊慌失措 2021-01-02 22:21

Ok guys I\'m little stacked here. According to official documentation Google says that \"Once you\'ve defined your Drawable in XML, save the file in the res/drawable/ direct

8条回答
  •  我在风中等你
    2021-01-02 23:12

    Why cant you use BitmapDrawable heres a sample code:

    
    
    
    1. Just replace with your drawable src name and save this as .xml file.
    2. Store the file in res/drawable directory.
    3. Assign the reference to android:background="@drawable/drawable_resource" and it will be tiled.

    Example:

    
    

    Heres a complete template of Bitmap Drawable, you can choose attribute values accourding to your need.

    
    
    

    You can find documentation of the same here look for XML Bitmap.

提交回复
热议问题