Fixed cardview resizing itself idiotically in constraint layout

This commit is contained in:
Viktor De Pasquale 2020-01-06 16:33:55 +01:00
parent c0b56b927f
commit baf18a8762

View File

@ -12,25 +12,30 @@
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:id="@+id/dialog_base_outside_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.card.MaterialCardView
style="@style/WidgetFoundation.Card.Elevated"
android:layout_width="0dp"
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardElevation="@dimen/margin_generic"
app:layout_constrainedHeight="true"
app:cardUseCompatPadding="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHeight_default="wrap"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_default="percent"
app:layout_constraintWidth_max="400dp"
app:layout_constraintWidth_percent="1">
<com.google.android.material.card.MaterialCardView
style="@style/WidgetFoundation.Card.Elevated"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardElevation="@dimen/margin_generic"
app:cardUseCompatPadding="true">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
@ -232,6 +237,8 @@
</com.google.android.material.card.MaterialCardView>
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>