title: Different results of Android Support Library's CardView on different devices
body: <p>Playing with <code>Android Support Library</code> v7 widget <code>CardView</code> I see different results on a Galaxy S4 comparing to a Nexus 4 device. Having the following layout:</p>
  <pre><code>&lt;android.support.v7.widget.CardView xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:card_view=&quot;http://schemas.android.com/apk/res-auto&quot;
      android:id=&quot;@+id/card_view&quot;
      android:layout_width=&quot;fill_parent&quot;
      android:layout_height=&quot;150dp&quot;
      android:layout_gravity=&quot;center&quot;
      android:layout_marginTop=&quot;8dp&quot;
      android:layout_marginBottom=&quot;10dp&quot;
      android:layout_marginLeft=&quot;20dp&quot;
      android:layout_marginRight=&quot;20dp&quot;
      android:orientation=&quot;horizontal&quot;
      card_view:cardCornerRadius=&quot;7dp&quot;
      card_view:cardElevation=&quot;12dp&quot;&gt;
  
      &lt;ScrollView
          android:id=&quot;@+id/scrollView&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_alignParentStart=&quot;true&quot;
          android:layout_centerVertical=&quot;true&quot;&gt;
  
          &lt;TextView
              android:id=&quot;@+id/txtExample&quot;
              android:layout_width=&quot;wrap_content&quot;
              android:layout_height=&quot;wrap_content&quot;
              android:text=&quot;@string/no_messages&quot; /&gt;
  
      &lt;/ScrollView&gt;
  
  &lt;/android.support.v7.widget.CardView&gt;
  </code></pre>
  <p>I got these results:</p>
  <p><strong>Nexus 4 (5.0.1):</strong>
  <img src="https://i.stack.imgur.com/PmxIv.png" alt="enter image description here" /></p>
  <p><strong>Samsung Galaxy S4 (4.4.2):</strong>
  <img src="https://i.stack.imgur.com/gMUUj.png" alt="enter image description here" /></p>
  <p>It seems that the one on Nexus calculates the View with it's margins, and then the paints the shadow outside. On the other hand, the one of Samsung seems to apply margins and then paint the shadow inside until it reaches the calculated View's bounds.</p>
  <p>Am I missing something?</p>