Border for the layout
android, android-linearlayout, border
Solution
try this:
STEP 1 : Create the file `layout_border.xml` in your project's drawables directory (res/drawable/layout_border.xml) :
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#FFFFFF"/>
<stroke android:width="3dip" android:color="#B1BCBE" />
<corners android:radius="10dip"/>
<padding android:left="0dip" android:top="0dip" android:right="0dip" android:bottom="0dip" />
</shape>
STEP 2:
<EditText
android:id="@+id/edittext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/layout_border"
/>
Problem
I am trying to make a border around my layout like this But what i am trying just change the layout color. Not make any border. My code is ``` <?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <stroke android:width="1dp" android:color="#eedfcc" android:background="#000080"/> <corners android:bottomRightRadius="20dp" android:bottomLeftRadius="20dp" android:topLeftRadius="10dp" android:topRightRadius="8dp"/> </shape> ``` Why it does not work out?