This question already has an answer here:
- How to have EditText with border in Android Lollipop 5 answers
anybody could tell me, how to put a border in an editText in AndroidStudio?
for example a square in an editText.
This question already has an answer here:
anybody could tell me, how to put a border in an editText in AndroidStudio?
for example a square in an editText.
just try this one,
first create one XML file, inside drawable folder (use new drawable xml) and add this lines
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"/>
<solid android:color="#000000"/>
<stroke
android:color="#ffffff"
android:width="05dp"/>
<corners android:radius="20dp"/>
then add this line inside Your edittext property
android:background="@drawable/(file_name)"
i don't know what your expecting, maybe it will help you
It's so easy bro
First step create an shape.xml in your directory drawable
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="1dp"
android:color="@android:color/black"/>
</shape>
Second step create your editext in your layout.xml and put background with the shape that you created above
<EditText
android:id="@+id/edittext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape"/>
It's all