I am trying to create thin colored stripes in my app. This is similar to stripes of different color that we see in calendar apps.
Is there any easy way to do it.
What I am doing: I have a shape defined with width and height and I am trying to apply it to background of my ListView as it will occupy certain part of the ListView.
What is happening: This is getting applied to the whole background.
What I need: I am looking for help which can make this as stripes instead of complete background. or any other way or alternatives for doing the same.
Some code: rectangle.xml
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="0dp"
/>
<size
android:width="20dp"
android:height="40dp" />
<solid
android:color="@color/opaque_red"
/>
</shape>
list_view_item_cell.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="95dp"
android:divider="?android:dividerVertical"
android:showDividers="middle" >