teja2495
10/20/2018 - 4:31 AM

Rounded black border for UI elements

Copy this file to drawable and Set this as background for the element using this command.

android:background="@drawable/shape"

<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#ffffffff" />

    <stroke
        android:width="2dp"
        android:color="#ff000000" />

    <padding
        android:bottom="3dp"
        android:left="12dp"
        android:right="3dp"
        android:top="3dp" />

    <corners
        android:bottomLeftRadius="10dp"
        android:bottomRightRadius="10dp"
        android:topLeftRadius="10dp"
        android:topRightRadius="10dp" />
</shape>