title: BitmapDrawable cannot be cast to RoundRectDrawableWithShadow
body: <p>I am trying to extend a cardview to set the background image. I know that this can not be done with normal cardview. I have searched net and found plenty of solutions for setting a background color to the card view but none for image.</p>
  
  <p>My code to do so:</p>
  
  <pre><code>public class CCView extends CardView {
  
      public  CCView (Context context) {
          super(context);
          init();
      }
  
      public CCView (Context context, AttributeSet attrs) {
          super(context, attrs);
          init();
      }
  
      public CCView (Context context, AttributeSet attrs, int defStyleAttr) {
          super(context, attrs, defStyleAttr);
          init();
      }
  
  
      private void init() {
  
         setBackground(getResources().getDrawable(R.drawable.cc_background));
  
      }
  }
  </code></pre>
  
  <p>I get this exception when I populate the code from XML</p>
  
  <pre><code>android.graphics.drawable.BitmapDrawable cannot be cast to android.support.v7.widget.RoundRectDrawableWithShadow
  </code></pre>
  
  <p>Any solution?   </p>