Reputation: 9804
I try to reproduce a button like this :
There is a gray background with a bottom border in other gray.
I don't how to add this fine bottom border. Here is my result now :
Here is the code of my button :
<Button
android:id="@+id/button_consulter_original"
style="?android:attr/borderlessButtonStyle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:layout_marginLeft="50dp"
android:layout_marginRight="50dp"
android:layout_marginTop="10dp"
android:background="@drawable/button_custom"
android:text="@string/detail_article_view_consulter_sur_web"
android:textColor="@color/blanc" />
and the code of button_custom.xml :
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/bleuactionbarFonce"
android:state_pressed="true" />
<item android:drawable="@color/bleuHome"
android:state_focused="true" />
<item android:drawable="@color/gray" />
</selector>
Upvotes: 1
Views: 2157
Reputation: 8028
Add this view below your Button
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:color/darker_gray" />
this will add the border effect,
Upvotes: 1