Есть вертикальный linear layout. В нем должно быть два cardview, которые должны занимать половину layout. Как это сделать. Сейчас получается так, что размеры cardview меняются в зависимости от загружаемой картинки.
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".CompanyMenuFragment"
android:orientation="vertical">
<!-- TODO: Update blank fragment layout -->
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
card_view:cardUseCompatPadding="true"
card_view:cardCornerRadius="8dp">
<ImageView
android:id="@+id/menu_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="fitCenter" />
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
card_view:cardUseCompatPadding="true"
card_view:cardCornerRadius="8dp">
<ImageView
android:id="@+id/menu_image1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="fitCenter"/>
</android.support.v7.widget.CardView>
</LinearLayout>