Question: Is it possible to create an Android shape object with stroke on only certain sides?

Eg I have:

```
<stroke 
 android:width="3dip" 
 android:color="#000000"
    android:dashWidth="10dip" 
    android:dashGap="6dip" />

```

Which is similar to this CSS:

```
border: 3px dashed black;

```

How can I set the stroke on just one side? This is how I would do it in CSS:

```
border-left: 3px dashed black;

```

How do you do this in Android XML?

Answer: 
I know this question was posted long ago, so the answer will not be used by the person who posted this question, but it may still help others.

```
 <?xml version="1.0" encoding="UTF-8"?>
    <!-- inset is used to remove border from top, it can remove border from any other side-->
    <inset xmlns:android="http://schemas.android.com/apk/res/android"
        android:insetTop="-2dp"
        >
    <shape xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/rectangle">
        <stroke android:width="1dp" android:color="#b7b7b7" />
        <corners android:bottomRightRadius="5dp"  android:bottomLeftRadius="5dp"/>

        <solid android:color="#454444"/>
    </shape>
    </inset>

```

Use the `inset` tag and give a negative value for the side border you want to remove. 

The possible values are:

`android:insetTop="-1dp" 
 android:insetBottom="-1dp"
 android:insetLeft="-1dp"
 android:insetRight="-1dp"`
I solved this by using a list-layer, combining two shapes, one of which with height 1dp placed at the bottom

optionscreen\_bottomrectangle.xml:

```
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- This is the line -->
<item>
      <shape>
            <solid android:color="#535353" />
      </shape>
</item>
<!-- This is the main color -->
<item android:bottom="1dp">
     <shape>
           <solid android:color="#252525" />
     </shape>
</item>
</layer-list>

```

Then, in the layout/main.xml file

```
<TextView
    android:id="@+id/bottom_rectangle"
    android:background="@drawable/optionscreen_bottomrectangle"
    android:layout_width="fill_parent"
    android:layout_height="0dp"
    android:layout_below="@id/table_options"
    android:layout_above="@id/exit_bar"/>

```

Which fills the gap between table\_options and exit\_bar with a background and just before exit\_bar prints a 1dp line. This did the trick for me, I hope it helps someone else.

Answer edited to place layers in the correct order. Thx Alex!