Expandable layout - can't with change layout params
<p>I have problem with changing Exapandable layout params. I'm using layout from this library:
<a href="https://github.com/AAkira/ExpandableLayout" rel="nofollow">https://github.com/AAkira/ExpandableLayout</a></p>

<p>I put ImageView inside this layout and than when I download picture into ImageView I want my layout to wrap this image.</p>

<pre><code>&lt;com.github.aakira.expandablelayout.ExpandableRelativeLayout
            android:id="@+id/expandable_area"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:layout_below="@+id/event_accepted_people_scrollview"
            android:layout_alignParentStart="true"&gt;

                &lt;android.support.v7.widget.AppCompatImageView
                    android:id="@+id/card_map_icon"
                    android:layout_width="70dp"
                    android:layout_height="70dp"
                    app:srcCompat="@drawable/vector_drawable_ic_map_black___px"
                    android:tint="@color/skilltrade_grey"
                    android:scaleType="center"
                    android:layout_marginTop="5dp"
                    android:layout_centerHorizontal="true"
                    android:background="@drawable/ripple_effect"/&gt;

                &lt;TextView
                    android:id="@+id/no_map_snapshot_textview"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/no_map_snapshot"
                    android:gravity="center_horizontal"
                    android:layout_marginBottom="15dp"
                    android:layout_below="@id/card_map_icon"/&gt;


                &lt;ImageView
                    android:id="@+id/carditem_map_snapshot"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_below="@id/details_map_textview"
                    android:scaleType="center"
                    android:layout_marginTop="5dp" /&gt;

        &lt;/com.github.aakira.expandablelayout.ExpandableRelativeLayout&gt;
</code></pre>

<p>Problem is that layout wraps only AppCompatImageView and TextView because ImageView source is not set and it's height is 0. After downloading picture layout is not wraping content correctlly... </p>

<p>That's what I'm doing now:<br>
-I download picture in size 640x480.<br>
-Than I scale it to match my screen<br>
-After that when I know height of my image I change params of my Expandable layout like this:<br></p>

<pre><code>RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) mapSnapshot.getLayoutParams();
        params.width = width;//scaled picture width
        params.height = height;//scaled picture height
        mapSnapshot.setLayoutParams(params);
        expandableArea.updateViewLayout(mapSnapshot, params);
</code></pre>

<p>Unfortunately it's not working and layouts height is still not matching ImageView...</p>

<p>I would be grateful for any help :)</p>