Skip to content

Commit

Permalink
prefer vertical format for cards with square images
Browse files Browse the repository at this point in the history
  • Loading branch information
connyduck committed Dec 17, 2024
1 parent 4b89789 commit a38f6ce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ protected void setupCard(
int radius = context.getResources().getDimensionPixelSize(R.dimen.inner_card_radius);
ShapeAppearanceModel.Builder cardImageShape = ShapeAppearanceModel.builder();

if (card.getWidth() > card.getHeight()) {
if (card.getWidth() >= card.getHeight()) {
cardLayout.setOrientation(LinearLayout.VERTICAL);
cardImage.getLayoutParams().height = cardImage.getContext().getResources()
.getDimensionPixelSize(R.dimen.card_image_vertical_height);
Expand Down

0 comments on commit a38f6ce

Please sign in to comment.