Created
August 7, 2017 14:46
-
-
Save abhimuktheeswarar/0c760635817cc790e2be0f49262086a7 to your computer and use it in GitHub Desktop.
Create a perfect square cardview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SquareCardView extends CardView { | |
public SquareCardView(Context context) { | |
super(context); | |
} | |
public SquareCardView(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
} | |
@Override | |
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { | |
super.onMeasure(widthMeasureSpec, widthMeasureSpec); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment