fix card view outline being off a few pixels (#1375)

This commit is contained in:
Konrad Pozniak 2019-07-10 06:53:21 +02:00 committed by GitHub
parent 1dda2c55fc
commit 75734d0e91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,6 +56,8 @@ class StatusDetailedViewHolder extends StatusBaseViewHolder {
cardDescription = view.findViewById(R.id.card_description); cardDescription = view.findViewById(R.id.card_description);
cardUrl = view.findViewById(R.id.card_link); cardUrl = view.findViewById(R.id.card_link);
infoDivider = view.findViewById(R.id.status_info_divider); infoDivider = view.findViewById(R.id.status_info_divider);
cardView.setClipToOutline(true);
} }
@Override @Override
@ -194,7 +196,6 @@ class StatusDetailedViewHolder extends StatusBaseViewHolder {
int radius = cardImage.getContext().getResources() int radius = cardImage.getContext().getResources()
.getDimensionPixelSize(R.dimen.card_radius); .getDimensionPixelSize(R.dimen.card_radius);
cardView.setClipToOutline(true);
Glide.with(cardImage) Glide.with(cardImage)
.load(card.getImage()) .load(card.getImage())
.transform(new CenterCrop(), new RoundedCornersTransformation(radius, 0, cornertype)) .transform(new CenterCrop(), new RoundedCornersTransformation(radius, 0, cornertype))