how to set border to layout
<p>I want set a border to Relativelayout. I make relativelayout clickable and use selector for changing selected color, also I use shape for rounding corners of layout. But when I select the layou the shape takes all background including the border. I can't find a way for solving this problem.</p>

<p>This is my main.xml    </p>

<pre><code>&lt;RelativeLayout android:id="@+id/map_refresh"
                android:layout_height="fill_parent" android:layout_width="wrap_content" 
                android:background="@drawable/settings_selector_up" 
                android:padding="15dp"
                android:layout_marginLeft="15dip" android:layout_marginRight="15dip" android:layout_marginTop="5dip"&gt;
                &lt;TextView android:id="@+id/Text1" 
                    android:layout_height="wrap_content" android:layout_width="wrap_content"
                    android:text="Map refresh period"&gt;
                &lt;/TextView&gt;
                &lt;TextView android:id="@+id/TextView09" 
                    android:layout_height="wrap_content" android:layout_width="wrap_content"
                    android:text="1 min" 
                    android:layout_alignParentRight="true"
                    android:paddingRight="5dp"&gt;
                &lt;/TextView&gt;
            &lt;/RelativeLayout&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>this is my settings_selector_up.xml</p>

<pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;!-- Non focused states --&gt;
    &lt;item android:state_focused="false" android:state_selected="false"
        android:state_pressed="false" android:background="@drawable/settings_border_roundup" /&gt;
    &lt;item android:state_focused="false" android:state_selected="true"
        android:state_pressed="false" android:drawable="@drawable/settings_border_roundup" /&gt;

    &lt;!-- Focused states --&gt;
    &lt;item android:state_focused="true" android:state_selected="false"
        android:state_pressed="false" android:drawable="@drawable/settings_border_roundup" /&gt;
    &lt;item android:state_focused="true" android:state_selected="true"
        android:state_pressed="false" android:drawable="@drawable/settings_border_roundup" /&gt;

    &lt;!-- Pressed --&gt;
    &lt;item android:state_selected="true" android:state_pressed="true"
        android:drawable="@drawable/selector_pressed" &gt; 
        &lt;/item&gt;
    &lt;item android:state_pressed="true" android:drawable="@drawable/list_selector_pressed" /&gt;
&lt;/selector&gt;
</code></pre>

<p>And this is my selector_pressed</p>

<pre><code>&lt;shape
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle"&gt;
    &lt;solid android:color="#E6E6E6"&gt;&lt;/solid&gt;
    &lt;corners android:radius ="10dp" /&gt;
&lt;/shape&gt;
</code></pre>

<p>Is there a way receive same result as we go for example using listselector in listView (in listview when I select the listitem only background color changed but border stayed unchanged).</p>
