How to add XML drawable in Eclipse

后端 未结 8 603
青春惊慌失措
青春惊慌失措 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:19

    It's is exactly like you said : you have the create the file manually. But also the XML file content has to be valid. That's all. You can show us your button_drawable.xml content so we check it.

    0 讨论(0)
  • 2021-01-02 23:25

    Just add a new XML file into the res/drawable folder. The drawable file looks like next:

    <?xml version="1.0" encoding="utf-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/android">
        <gradient
            android:startColor="#FF000000"
            android:centerColor="#FF000000"
            android:endColor="#FF777777"
            android:angle="90" />
    </shape>
    
    0 讨论(0)
提交回复
热议问题