title: Android layout max width OR screen-width?
body: <p>Is it possible to set the width of a child to be a fixed width unless the screen is less than that width?</p>
  
  <p>i.e. I want the CardView below to be 400dp normally, unless it's on a small screen at which point it should be the screen-width (minus margin)...</p>
  
  <pre><code>&lt;cdudigital.com.conjugator.MyLinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:orientation="vertical"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:gravity="center"
      tools:context=".GameActivity"&gt;
      &lt;android.support.v7.widget.CardView
          xmlns:card_view="http://schemas.android.com/apk/res-auto"
          android:id="@+id/card_view"
          android:layout_gravity="center"
          android:gravity="center"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          card_view:cardCornerRadius="4dp"
          card_view:cardElevation="3dp"&gt;
      &lt;/android.support.v7.widget.CardView&gt;
  &lt;/cdudigital.com.conjugator.MyLinearLayout&gt;
  </code></pre>