0
Android : & 높이를 ShapeDrawable
xml로 지정하는 방법이 있습니까? 이것은 놀랍게도 어려워 보인다. <size>
자식을 사용하면 작동하지 않으며 <shape>
을 레이어 목록 항목으로 묶고 android:height
및 android:weight
특성을 설정하지 않습니다. shape
태그에서 항상 사용할 수xml에서 ShapeDrawable의 너비와 높이를 지정하는 방법이 있습니까?
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!--
How do you set shape size?
The top/bottom attributes allow setting size via an inset
from the parent element, but isn't there way to explicitly
set width and height???
-->
<item
android:bottom="0dp"
android:left="0dp"
android:right="0dp"
android:top="0dp">
<shape android:shape="rectangle" >
<solid android:color="#f00" />
<stroke
android:width="1dp"
android:color="#0f0" />
</shape>
</item>
</layer-list>