title: Android: show gradient like shadow using shape.xml
body: <p>Hi I am trying to get shadow like gradient only on the top using the shape.xml </p>
  
  <p><a href="https://i.stack.imgur.com/byuKw.png" rel="noreferrer"><img src="https://i.stack.imgur.com/byuKw.png" alt="enter image description here"></a></p>
  
  <p>From the image am wrapping the buttons in a linear layout and I want to give the gradient on top of the layout.</p>
  
  <p>Am doing as below but it is not working out</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android" &gt;
      &lt;item&gt;
        &lt;shape 
          android:shape="rectangle"&gt;
              &lt;stroke android:width="1dp" android:color="#f0f0f0" /&gt;
              &lt;solid android:color="#f0f0f0" /&gt;
  
          &lt;/shape&gt;
     &lt;/item&gt;
  
     &lt;item android:top="1dp"&gt; 
        &lt;shape 
          android:shape="line"&gt;
         &lt;gradient
  
          android:angle="90"
          android:type="linear"
          android:startColor="#FFFFFF"
          android:endColor="#000000" /&gt;
          &lt;/shape&gt;
     &lt;/item&gt;
  
  &lt;/layer-list&gt;
  </code></pre>