nestedScrollView is stretching imageview in android
<p>i'm trying to nest a imageview inside a linearlayout inside a nestedscrollview.. But the nestedscrollview is stretching the imageview and I can't seem to find the error: </p>

<p>layout file: </p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"&gt;

    &lt;android.support.v4.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="true"
        android:fitsSystemWindows="true"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"&gt;

        &lt;LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"&gt;

            &lt;LinearLayout
                android:id="@+id/llImageview"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginTop="?attr/actionBarSize"
                android:layout_weight="0.6"
                android:orientation="horizontal"&gt;

                &lt;ImageView
                    android:id="@+id/ivNewProductBarcode"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:adjustViewBounds="true"
                    android:background="@drawable/no_barcode_image"
                    android:scaleType="centerCrop"/&gt;
            &lt;/LinearLayout&gt;

            &lt;LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="0.45"
                android:background="@color/cardview_dark_background"
                android:baselineAligned="true"
                android:orientation="vertical"&gt;


                &lt;LinearLayout
                    android:id="@+id/llRest"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="vertical"&gt;

                    &lt;ImageView
                        android:id="@+id/ivDateIconView"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_toStartOf="@+id/etProductName"
                        android:background="@color/card_background"
                        android:contentDescription="ImageView for icon: Date" /&gt;

                    &lt;EditText
                        android:id="@+id/etProductName"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="40dp"
                        android:layout_marginRight="30dp"
                        android:layout_marginTop="30dp"
                        android:hint="Name" /&gt;

                    &lt;EditText
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="40dp"
                        android:layout_marginRight="30dp"
                        android:layout_marginTop="80dp"
                        android:hint="Type" /&gt;
                &lt;/LinearLayout&gt;

            &lt;/LinearLayout&gt;
        &lt;/LinearLayout&gt;
    &lt;/android.support.v4.widget.NestedScrollView&gt;

    &lt;android.support.design.widget.FloatingActionButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:clickable="true"
        android:src="@drawable/ic_camera_alt_24dp"
        app:layout_anchor="@id/llImageview"
        app:layout_anchorGravity="bottom|right|end" /&gt;

    &lt;android.support.v7.widget.Toolbar
        android:id="@+id/my_toolbar_new_product"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="?attr/colorPrimary"
        android:elevation="4dp"
        android:fitsSystemWindows="true"
        android:theme="@style/ThemeOverlay.AppCompat.ActionBar"
        android:title="@string/newproducttitle"
        app:layout_scrollFlags="scroll|enterAlways"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /&gt;


&lt;/android.support.design.widget.CoordinatorLayout&gt;
</code></pre>

<p>And a image of how it looks on the phone:
<a href="https://i.stack.imgur.com/X0T1Y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X0T1Y.png" alt="Image Stretched"></a>
<a href="https://i.stack.imgur.com/xGbrX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xGbrX.png" alt="Image Stretched and rest of gui"></a></p>