I've got the following drawable resource:
<layer-list>
<item><shape>
<gradient android:angle="225" android:endColor="#080517" android:startColor="#241c4d" />
<stroke android:width="2.5dp" android:color="#FFFFFF" />
<corners android:radius="5dp" />
</shape></item>
<item>
<bitmap android:gravity="right|center_vertical" android:src="@drawable/tri_arrow_down_blue64" />
</item>
</layer-list>
the problem is: I can not specify the exact size of the bitmap (in dp). as a result - the bitmap affects the height of a control with background set to that drawable.
I can workaround the problem by putting the control inside the FrameLayout, an extracting the bitmap portion of the drawable into an ImageView placed into the same FrameLayout. This solves the problem because ImageView can define the exact width and height of the bitmap (through layout_width and layout_height). But drawable does not have such (or similar) attributes. I wonder why this is so? and is there a more elegant way of specifying the size of a bitmap drawable right inside the drawable XML - instead of implementing that ugly workaround with FrameLayout?
thanks