1

I a created triangle shape following this post

enter image description here

<?xml version="1.0" encoding="utf-8"?>
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
 <item>
    <rotate
        android:fromDegrees="45"
        android:toDegrees="45"
        android:pivotX="-40%"
        android:pivotY="87%" >
        <shape
            android:shape="rectangle" >
            <stroke android:color="@color/transparent" android:width="10dp"/>
            <solid
                android:color="@color/your_color_here" />
        </shape>
    </rotate>
</item>

But I have not been able to incline it towards the right or the left.

Any help is appreciated.

Thanks

David L
  • 32,885
  • 8
  • 62
  • 93
Ravi Sharma
  • 873
  • 7
  • 24
  • Please give reason why to close this question ? – Ravi Sharma Apr 16 '15 at 13:56
  • This question has two flags: "too broad" and "off-topic". Essentially, your question is of the type "is such a thing possible, and if so how?" You would do much better to make an attempt yourself, try some things out, and show progress. If there's a point where you're stuck in your particular implementation, then go ahead and ask about that specific issue. – Adam Hawkes Apr 16 '15 at 14:55
  • @AdamHawkes thanks for the valuable remarks. Ok...so I tried to create this design...created triangle, rectangle, separately in pieces...I am trying to create this design. – Ravi Sharma Apr 16 '15 at 15:01
  • @AdamHawkes actually multiple things are in my mind....not sure whether I should use xml for this design or I should design it using android.graphics.drawable.shapes.Shape – Ravi Sharma Apr 16 '15 at 15:04
  • I'm not well versed in either of these techniques, so I cannot say what the capabilities are or which would be a better tool for your situation. My contribution here to help you understand why the question was flagged to be closed. – Adam Hawkes Apr 16 '15 at 15:12
  • @AdamHawkes Ok...anyways thanks Adam. – Ravi Sharma Apr 16 '15 at 15:13
  • @AdamHawkes Please review the question so that it can be opened again – Ravi Sharma Apr 17 '15 at 10:43
  • It's not totally up to me, but I nominated it to be reopened. – Adam Hawkes Apr 17 '15 at 18:47

1 Answers1

1

I think you could create this layout by overlaying different shapes one after another like it is shown in the selected for best answer in this question Android: Drawing custom shapes First <item> could be your rectangle and then you could use one rectangle and one triangle for the pointer

Community
  • 1
  • 1
Gabriella Angelova
  • 2,985
  • 1
  • 17
  • 30