title: How to set foreground attribute to other non FrameLayout view
body: <p>I would like to know how to apply or emulate foreground effect in a view different from FrameLayout, as LinearLayout or RelativeLayout</p>
  
  <p>This is what I have now:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/cardContent"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@drawable/row_background"
      android:foreground="@drawable/foreground_row"&gt;
  
      ...
  
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>And I want something like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;RelativeLayout
          xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          android:id="@+id/cardContent"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:background="@drawable/row_background"
          app:foreground="@drawable/foreground_row"&gt;
  
          ...
  
      &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Thanks in advance!!</p>