title: How to set Ripple effect on a LinearLayout programmatically?
body: <p>I want to set the background <code>android.R.attr.selectableItemBackground</code> to a <code>LinearLayout</code>. When using XML there are no problems (it works)</p>
  
  <pre><code>&lt;LinearLayout
      android:id="@+id/llMiner"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="?android:attr/selectableItemBackground"
      android:clickable="true" &gt;
  </code></pre>
  
  <p>... but I have to do this in java code, so I've tried this</p>
  
  <pre><code>llMiner.setClickable(true);
  llMiner.setBackgroundResource(android.R.attr.selectableItemBackground);
  </code></pre>
  
  <p>... and it doesn't work, infact I get a <code>NotFoundException</code> on this second line.
  So after I've tried this variant thinking that the resource is a Color.</p>
  
  <pre><code>llMiner.setClickable(true);
  llMiner.setBackgroundColor(android.R.attr.selectableItemBackground);
  </code></pre>
  
  <p>This one doesn't launch exception, but... doesn't work (there are no changing of background when pressing, but the state change in pressed as it have to do)... any suggestion?</p>