Sunday, 15 February 2015

How to define a rectangle with a circle at the end using Android XML definitions -



How to define a rectangle with a circle at the end using Android XML definitions -

is possible define shape shown on next image:

i tried layer-list not find solution close looking for.

i want utilize resulting shape background image relativelayout transparency.

any hints appreciated! give thanks you.

here shape asked for:

<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item> <shape android:shape="rectangle"> <size android:width="250dp" android:height="100dp" /> <solid android:color="#ffffff" /> </shape> </item> <item android:top="0dp"> <shape android:shape="line"> <stroke android:width="25dp" android:color="#000000" /> </shape> </item> <item android:right="0dp" android:left="150dp"> <shape android:shape="oval"> <solid android:color="#000000" /> </shape> </item> </layer-list>

screenshot:

android android-shapedrawable

No comments:

Post a Comment