title: Add ripple effect to my button with button background color?
body: <p>I created a button and I want to add ripple effect to that button!</p>
  
  <p>I created a button bg XML file: (bg_btn.xml)</p>
  
  <pre><code>&lt;shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"&gt;
  &lt;gradient android:startColor="#FFFFFF" android:endColor="#00FF00" android:angle="270" /&gt;
  &lt;corners android:radius="3dp" /&gt;
  &lt;stroke android:width="5px" android:color="#000000" /&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p>And this is my ripple effect file: (ripple_bg.xml)</p>
  
  <pre><code>&lt;ripple xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:color="#f816a463"
      tools:targetApi="lollipop"&gt;
      &lt;item android:id="@android:id/mask"&gt;
          &lt;shape android:shape="rectangle"&gt;
              &lt;solid android:color="#f816a463" /&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  &lt;/ripple&gt;
  </code></pre>
  
  <p>And This is my Button which I want to add ripple effect:</p>
  
  <pre><code>&lt;Button
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:text="New Button"
  android:id="@+id/button"
  android:layout_centerHorizontal="true"
  android:layout_marginTop="173dp"
  android:textColor="#fff"
  android:background="@drawable/ripple_bg"
  android:clickable="true" /&gt;
  </code></pre>
  
  <p>But after adding ripple effect button background is transparent, and button display only when clicked,
  like this:</p>
  
  <p>Before Click</p>
  
  <p><img src="https://i.stack.imgur.com/LyVDSl.png" alt=""> </p>
  
  <p>On Click</p>
  
  <p><img src="https://i.stack.imgur.com/dpdhil.png" alt=""></p>
  
  <p>But I need both button background color and ripple effect,
  I found some of this code in different blogs of Stack Overflow, but still it is not working!</p>