PROBLEM
I want to create 3 rectangles in the vertical. Then, I want the first and the last one transparent. but the result look like the second rectangle height is bigger than it should be (its height big equal 2 rectangle)
PICTURE
Before it transparent...
After it transparent...
What I want...
XML LAYER-LIST
<layer-list xmlns:android= "http://schemas.android.com/apk/res/android">
<item android:top="0dp">
<shape android:shape="rectangle">
<solid android:color="@android:color/transparent"/>
<size android:height="5dp" android:width="20dp"/>
</shape>
</item>
<item android:top="5dp">
<shape android:shape="rectangle">
<solid android:color="@android:color/holo_green_light"/>
<size android:height="5dp" android:width="20dp"/>
</shape>
</item>
<item android:top="10dp">
<shape android:shape="rectangle">
<solid android:color="@android:color/transparent"/>
<size android:height="5dp" android:width="20dp"/>
</shape>
</item>
</layer-list>
0 comments:
Post a Comment