Fix color offset on devices with notches.

This commit is contained in:
Alex Hart
2021-10-01 16:09:54 -03:00
committed by Cody Henthorne
parent a385cb0b68
commit 52cfb57d36
9 changed files with 18 additions and 29 deletions

View File

@@ -10,6 +10,7 @@ import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
@@ -207,9 +208,9 @@ public class ConversationItemFooter extends ConstraintLayout {
setBackground(null);
}
public @Nullable Projection getProjection() {
public @Nullable Projection getProjection(@NonNull ViewGroup coordinateRoot) {
if (getVisibility() == VISIBLE) {
return Projection.relativeToViewRoot(this, new Projection.Corners(ViewUtil.dpToPx(11)));
return Projection.relativeToParent(coordinateRoot, this, new Projection.Corners(ViewUtil.dpToPx(11)));
} else {
return null;
}