I have a CardView with rounded corners, I want to have an ImageView at the top like shown in the example taken from the material design guidelines
If your image size (width) is fixed with your ImageView width, you just only have to do is change your ImageView attribute to :
android:scaleType="fitXY"
That is. No additional image corner rounding, no busy work. Beside it efficient for app's performance.
Note : my suggestion may not appropriate for small image with large size ImageView.