title: How to use RippleDrawable programmatically in code (not xml) with Android 5.0 Lollipop?
body: <p>I have the following code for my ripple:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ripple xmlns:android="http://schemas.android.com/apk/res/android"
      android:color="?android:colorControlHighlight"&gt;
      &lt;item android:id="@+id/rip"&gt;
  
          &lt;shape android:shape="oval"&gt;
              &lt;solid android:color="?android:colorAccent"/&gt;
          &lt;/shape&gt;
      &lt;/item&gt;
  &lt;/ripple&gt;
  </code></pre>
  
  <p>Now I want to give the user the possibility to choose own colors, so I need to create the ripple programmatically.<br>
  I found <a href="https://developer.android.com/reference/android/graphics/drawable/RippleDrawable.html" rel="noreferrer">this</a> and I think this is the right way to do it, but I don't know how to handle with this.</p>
  
  <p>The ripple will be used here:</p>
  
  <pre><code>&lt;ImageButton
      android:id="@+id/add_button"
      android:layout_width="@dimen/diameter"
      android:layout_height="@dimen/diameter"
      android:layout_gravity="end|bottom"
      android:layout_marginBottom="@dimen/add_button_margin"
      android:layout_marginEnd="@dimen/add_button_margin"
      android:layout_alignParentBottom="true"
      android:layout_alignParentEnd="true"
      android:src="@drawable/ic_action_add_person"
      android:tint="@android:color/white"
      android:background="@drawable/oval_ripple"
      android:elevation="@dimen/elevation_low"
      android:stateListAnimator="@anim/button_elevation"
      android:contentDescription="Neuer Spieler" /&gt;
  </code></pre>
  
  <p>I need to set the background to a <code>RippleDrawable</code> like this:</p>
  
  <pre><code>addButton.setBackground(ripple);
  </code></pre>