Skip to content

Instantly share code, notes, and snippets.

@n1lesh
Created December 18, 2017 15:01
Show Gist options
  • Save n1lesh/9b473ce6f69c3e83e0da28c45848cf84 to your computer and use it in GitHub Desktop.
Save n1lesh/9b473ce6f69c3e83e0da28c45848cf84 to your computer and use it in GitHub Desktop.
Android CardView Sample - Java Raw
CardView cardView = (CardView) findViewById(R.id.cardView);
cardView.setUseCompatPadding(true);
cardView.setContentPadding(30, 30, 30, 0);
cardView.setPreventCornerOverlap(true);
cardView.setCardBackgroundColor(Color.WHITE);
cardView.setCardElevation(2.1f);
cardView.setRadius(0);
cardView.setMaxCardElevation(3f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment