I am creating a login layout for an app.For the background of the LinearLayout(id=@+id/lgn\_lyt) I tried to make it look like the image below.It looks fine in design editor,but in the device it look weird.The drawable I used is a vector image.Is it because of the vector image I used it coding mistake in the layerlist?Expecting your answers....

login\_lyt.xml:

```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <LinearLayout
        android:id="@+id/lgn_lyt"
        android:layout_gravity="center"
        android:layout_width="match_parent"
        android:layout_height="@dimen/usr_nm_lyt_hght"
        android:background="@drawable/usr_lyt_bg"
        android:layout_marginLeft="@dimen/usrnm_lyt_mrgn_left"
        android:layout_marginRight="@dimen/usrnm_lyt_mrgn_right"
        android:layout_marginTop="@dimen/usrnm_lyt_mrgn_top">
        <EditText
            android:id="@+id/usrnme"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:hint="@string/usr_hnt"
            android:background="@android:color/transparent"
            android:layout_marginLeft="@dimen/usrnm_mrgn_left"
            />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/psswrd_lyt"
        android:layout_gravity="center"
        android:layout_width="match_parent"
        android:layout_height="@dimen/usr_nm_lyt_hght"
        android:background="@drawable/psswrd_lyt_bg"
        android:layout_marginLeft="@dimen/usrnm_lyt_mrgn_left"
        android:layout_marginRight="@dimen/usrnm_lyt_mrgn_right"
        android:layout_marginTop="@dimen/usrnm_lyt_mrgn_top">
        <EditText
            android:id="@+id/psswrd"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:hint="@string/psswrd_hnt"
            android:inputType="textWebPassword"
            android:background="@android:color/transparent"
            android:layout_marginLeft="@dimen/usrnm_mrgn_left"
            />
    </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:gravity="center"
        android:layout_marginTop="@dimen/usrnm_lyt_mrgn_top"
        >
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/login"
            android:text="@string/login"
            android:textColor="#ffffff"
            android:background="@color/colorPrimary"
             />
    </LinearLayout>
</LinearLayout>

```

usr\_lyt\_bg.xml:

```
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        >
        <shape
            android:layout_height="match_parent"
            android:shape="rectangle"
            android:thickness="2dp">
            <solid android:color="#10000000"></solid>
        </shape>
    </item>
    <item
        android:gravity="center_vertical|left"
        android:drawable="@drawable/user"
        android:left="15dp"
        >
    </item>
</layer-list>

```

In design editor:
[![enter image description here](https://i.stack.imgur.com/RljGL.jpg)](https://i.stack.imgur.com/RljGL.jpg)

In Device:

[![enter image description here](https://i.stack.imgur.com/8g3YD.png)](https://i.stack.imgur.com/8g3YD.png)