4
我想要的是背景與紅色部分在左邊。像這樣的東西。 設置Android Drawable項目的寬度?
我試了很多東西(沒有任何所見即所得的編輯器嗎?我覺得我跑這幾百倍。)指定寬度喜歡在下面的文章沒有工作。 how to specify width and height of a drawable item
下面的文章只告訴我,我不能使用百分比,現在如何應用寬度。 Android Drawable: Specifying shape width in percent in the XML file?
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid
android:color="#FFFFFFFF"/>
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="#55FF0000" />
<size android:width="100px" />
</shape>
</item>
</layer-list>
我有同樣的問題。所以我該怎麼做? – shift66 2014-08-22 15:14:42