Issue
Hi I'm trying to make a drawable which looks like a small vertical line with a circle attached to the bottom of it. I am trying to figure out if creating such a shape in a single xml file is possible (I know I could probably place two shapes on top of each other but I'm trying to avoid doing that)
Here's what I have so far:
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/line">
<shape
android:shape="line"
>
<stroke
android:width="2dp"
android:color="#000000" />
<size android:height="12dp"/>
</shape>
</item>
<item
android:top="5px"
android:id="@+id/circle">
<shape
android:shape="oval"
android:useLevel="false"
android:innerRadius="5dp"
android:thickness="2dp"
>
<solid
android:color="@color/silver_status"
></solid>
<stroke
android:color="@color/silver_status"
android:width="1dp"
/>
</shape>
</item>
</layer-list>
This layers the two images on top of each other (I think) but what I really want is for them to be on top of each other
Anyone know if this is possible/how it can be done?
Solution
I ended up solving this simply by using the individual shapes within a linear layout to achieve the affect. Not exactly what I wanted but definitely does the job just fine.
Answered By - AIntel
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.