Skip to content

Instantly share code, notes, and snippets.

@lokcito
Created December 7, 2019 14:21
Show Gist options
  • Save lokcito/946ade6175d9ef1361e7f051b8e2366d to your computer and use it in GitHub Desktop.
Save lokcito/946ade6175d9ef1361e7f051b8e2366d to your computer and use it in GitHub Desktop.
Android Input Border: Añadiendo borders a EditText
#layout/activity_login.xml
<EditText
android:id="@+id/editText2"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@drawable/input_border_radius"
android:ems="10"
android:paddingLeft="20dp"
android:text="Name" />
#drawable/input_border_radius.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- res/drawable/input_border_radius.xml -->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<solid android:color="#FFFFFF"/>
<stroke android:width="2dp" android:color="#FF0000" />
<corners
android:bottomRightRadius="15dp"
android:bottomLeftRadius="15dp"
android:topLeftRadius="15dp"
android:topRightRadius="15dp"/>
</shape>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment