How to draw border on just one side of a linear layout?
<p>I'm able to draw border to a linear layout, but it is getting drawn on all sides. I want to restrict it to right side only, like you do in CSS (border-right:1px solid red;).</p>

<p>I've tried this, but it still draws on all sides:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt;
&lt;item&gt;
    &lt;shape android:shape="rectangle"&gt;
        &lt;stroke android:width="2dp" android:height="2dp"
            android:color="#FF0000" /&gt;
        &lt;solid android:color="#000000" /&gt;
        &lt;padding android:left="0dp" android:top="0dp" android:right="1dp"
            android:bottom="0dp" /&gt;

        &lt;corners android:radius="1dp" android:bottomRightRadius="5dp"
            android:bottomLeftRadius="0dp" android:topLeftRadius="5dp"
            android:topRightRadius="0dp" /&gt;
    &lt;/shape&gt;
&lt;/item&gt;
</code></pre>

<p></p>

<p>Any suggestions on how to accomplish this?</p>

<p>BTW, I do not want to use the hack of putting a view of width 1dp on the required side.</p>
