Simply create a Shape
in rectangle format in the drawable
folder and set it to background
of your view
:
drawable / border_azul.xml
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
// A cor do background
<solid android:color="#FF0099FF" />
// Borda (tamanho e cor)
<stroke android:width="1dip" android:color="#d4d4d4" />
// Arredondamento das bordas
<corners
android:bottomRightRadius="5dp"
android:bottomLeftRadius="5dp"
android:topLeftRadius="5dp"
android:topRightRadius="5dp"/>
</shape>
And set the background of some element like this:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/borda_azul">
...Seus componentes (Botões, etc)
</LinearLayout>