Reputation: 446
any idea how can i implement this small spike under action bar and it can be in the same place for different screen sizes?
Upvotes: 1
Views: 121
Reputation: 363835
You can use a .png for different resolutions.
Otherwise you can build a triangle using a xml file.
Something like this:
<?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="135%"
android:pivotY="15%" >
<shape
android:shape="rectangle" >
<stroke android:color="@android:color/transparent" android:width="XXdp"/>
<solid
android:color="@color/mycolor" />
</shape>
</rotate>
</item>
</layer-list>
Upvotes: 2